Awhile back somewhere maybe reading someone else's code or perhaps a tutorial I saw where someone did a simple Yes/No Alert window pop-up. Can someone post the code to do this? I know alert << "My text here." part, but not how to add the buttons Yes/No instead of just OK.
LJR
ID:149677
Mar 9 2002, 9:49 pm
|
|
Mar 9 2002, 9:55 pm
|
|
switch(alert("Yes or no?",,"Yes","No"))
|
In response to Nadrew
|
|
SWEET!!! I knew there had to be an easier way! ;)
LJR |
In response to Nadrew
|
|
Ok and how would I get the result if Yes?? Do an if? but how?
LJR |
In response to LordJR
|
|
mob/verb/Test() |
In response to Nadrew
|
|
ah.. I see no == just if("Yes") cool cool.. thanks man
LJR ps. Keep on the look out for Star Traders ;) |
In response to LordJR
|
|
When you use switch() it allows you to use if("Condition") instead of if(var == "condition")
mob/verb/Test() Is the same as the code I gave you. You could also do switch(promptbox) |
In response to LordJR
|
|
Just a little lesson, you could have avoided this question by looking up alert() in the reference! It has the following example:
mob/verb/self_destruct() |
In response to Foomer
|
|
hehehe Well golly Gee Jinkins! Thats where I saw it before!!! I just couldn't remember where.
LJR |