Go to... script command?

Started by SilverWizard_OTF, Sat 21/08/2004 17:54:44

Previous topic - Next topic

Ishmael

Quote from: Alynn on Mon 30/08/2004 07:07:43
while (password!=silver){
Ã,  Ã, Display(WRONG!);
Ã,  Ã, InputBox("The password is", password);
}

while (StrCaseComp("silver",password) == 1) {

or however it goes ;)
I used to make games but then I took an IRC in the knee.

<Calin> Ishmael looks awesome all the time
\( Ö)/ ¬(Ö ) | Ja minähän en keskellä kirkasta päivää lähden minnekään juoksentelemaan ilman housuja.

Gilbert

Better use:
while (StrCaseComp("silver",password)) {

As it's not guaranteed to be always 1 if they do not match:
Quote
Returns 0 if the two strings match, non-zero otherwise.

Alynn

Well yeah but I didn't feel like looking it up... the point was made though :P

Pumaman

Just to clarify, I will not be adding a GoTo command to AGS. As others have pointed out, it is very bad programming practice and is nowadays considered obsolete.

"else if" and "while" are far better ways of coding.

SilverWizard, just in case you don't believe us, I can tell you that in the 50000 lines of AGS source code, there is not a single "goto" statement.

SilverWizard_OTF

Obviously i believe you!  :)
"All we have to decide is what to do, with the time that is given to us"

SMF spam blocked by CleanTalk