Select your best hookup:
Local
Gay
Asian
Latin
East Europe

skipthegames hookups

Weekly claims are needed to get rewards. ct gay hookup No, these date evening concerns for couples don t all need to be extremely deep. But what ismore terrifyingis not figuring out what to speak about on a 1st date. usa sex guide lowell ma This may appear a small also individual as far as first date queries go, but it s truly vital to know.

mega classifieds

Do not complicate your profile with gleaming and fake particulars. speed dating montgomery al Even soon after several attempts to locate the fantastic match, you need to hold onto the hope that the ideal person will at some point make it into your life. Confident, it could be challenging to inform if the particular person sitting in front of you would be a viable life companion because you re only just on your very first date. bedpage houston massage The on the web dating app market place is anticipated to hit USD 290 million in revenues by 2024.

Home  Sign In  Search  Date Ideas  Join  Forums  Singles Groups  - 100% FREE Online Dating, Join Now!


5/10/2015 11:56:18 AM PowerShell Help, Please!  

bluecollarman86
Over 4,000 Posts! (4,415)
Moorhead, MN
31, joined Aug. 2012


Hello there. So I did a script for a game where you guess a number, however you get as many guesses as you want. I'm new to scripting.. could someone please tell me how to make it so they only get 7 guesses? Then it'd tell the stats, and ask if you want to play again..
Here's the code.


# *************************************************************************
#
# Script Name: GuessMyNumber.ps1 (The Guess My Number Game)
# Version: 4.0
# Author: Jerry Lee Ford, Jr.
# Date: February 1, 2014
#
# Description: This PowerShell script challenges the player to attempt
# to guess a randomly generated number in the range of
# 1 to 100 in as few guesses as possible.
#
# *************************************************************************


#Clear console screen
Clear-Host


#Defne variables used in this script
$number = 0 #Keeps track of the game’s secret number
$noOfGuesses = 0 #Keeps track of the number of guesses made
$playGame = “Yes” #Controls when to quit the game
$status = “Play” #Controls the current round of play
$guess = 0 #Stores the player’s guess
$reply = “” #Stores the player’s response when asked to play again


#Display the game’s opening screen
Write-Host “`n`n`n`n`t W E L C O M E T O T H E G U E S S M Y”
Write-Host “`n`n`n`t`t`tN U M B E R G A M E”
Write-Host “`n`n`n`t`t`tBy Jerry Lee Ford, Jr.”
Write-Host “`n`n`n`n`n`n`n`n`n`n Press Enter to continue.”


#Pause the game until the player presses the Enter key
Read-Host



#Loop until the player decides to quit the game
while ($playGame -ne “No”) {

#Generate the game’s random number (between 1 - 100)
$number = Get-Random –minimum 1 –maximum 101

#Clear the console screen
Clear-Host


#Loop until the player guesses the secret number
while ($status -ne “Stop”) {


#Prompt the player to guess a number
while ($guess -eq “”) {


Clear-Host #Clear console screen

Write-Host

#Collect the player’s guess
$guess = Read-Host “ Enter a number between 1 and 100”
}

#Keep track of the number of guesses made so far
$noOfGuesses++


if ($guess -lt $number) { #The player’s guess was too low


Clear-Host #Clear the Windows command console screen
Write-Host “`n Sorry. Your guess was too low. Press Enter to” `
“guess again.” -ForegroundColor Green
$guess = “” #Reset the player’s guess
Read-Host #Pause the game until the player presses the Enter key

}
elseif ($guess -gt $number) { #The player’s guess was too high
Clear-Host #Clear the console screen

Write-Host “`n Sorry. Your guess was too high. Press Enter to” `
“guess again.” -ForegroundColor Red
$guess = “” #Reset the player’s guess

if($guess -gt 2){

$playGame = "Stop"
Write-Host "stop!"
Read-Host #Pause the game until the player presses the Enter key

}
else { #The player has guessed the game’s secret number


Clear-Host #Clear the Windows command console screen
Write-Host “`n Congratulations. You guessed my number! Press Enter” `
“to continue.”
[console]::Beep(1500,600)
$status = “Stop” #Reset the player’s guess
Read-Host #Pause the game until the player presses the Enter key


}

}
}
#Clear the Windows command console screen
Clear-Host


#Display the game’s opening screen
Write-Host “`n Game Statistics”
Write-Host “ -----------------------------------------------------------”
Write-Host “`n The secret number was: $number.”
Write-Host “`n You guessed it in $noOfGuesses guesses.`n”
Write-Host “ -----------------------------------------------------------”
Write-Host “`n`n`n`n`n`n`n`n`n`n`n`n`n`n Press Enter to continue.”


#Pause the game until the player presses the Enter key
Read-Host
#Clear the Windows command console screen
Clear-Host


$reply = “” #Stores the player’s response when asked to play again


#Prompt the player to play another round
while ($reply -eq “”) {


Clear-Host #Clear the Windows command console screen


Write-Host


#Collect the player’s answer
$reply = Read-Host “ Would you like to play again? (Y/N) “


#Validate player input, allowing only Y and N as acceptable responses
if (($reply -ne “Y”) -and ($reply -ne “N”)) {


$reply = “” #Reset the variable to its default value
}
}

#The player has elected to play again

if ($reply -eq “Y”) {


#Reset variables to their default values
$number = 0
$noOfGuesses = 0
$status = “Play”
$guess = 0


}
else { #The player has decided to quit playing
$playGame = “No” #Modify variable indicating that it is time to
#terminate gameplay

}
}



#Clear the console screen
Clear-Host


Thank you~

Meet singles at DateHookup.dating, we're 100% free! Join now!

DateHookup.dating - 100% Free Personals


5/10/2015 12:00:40 PM PowerShell Help, Please!  

bluecollarman86
Over 4,000 Posts! (4,415)
Moorhead, MN
31, joined Aug. 2012


I'm guessing i add a "if stat" somewhere? Something like
"if($noOfGuesses -eq 7 )
$status = "no"
write-host "Sorry too many guesses"
read-host "Press Enter to continue."
clear-host "

I'm probably pretty far off... also, does it matter where I put the code?

5/11/2015 12:01:05 PM PowerShell Help, Please!  

up2youandme
Over 10,000 Posts!!! (17,191)
Chandler, AZ
42, joined Jan. 2014


I'm not familiar with powrshell but in c++ there's an incremental variable. ..look into that

6/3/2015 7:58:21 AM PowerShell Help, Please!  

calthropstu
Over 10,000 Posts!!! (11,622)
Phoenix, AZ
38, joined Aug. 2012


Based on that code, when you prompt for input simply check the number of guesses variable. If it is greater than guesses allowed, write different output and kill the input.