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, 10:49 pm
|
|
![]() Mar 9 2002, 10:55 pm
|
|
switch(alert("Yes or no?",,"Yes","No"))
|
ah.. I see no == just if("Yes") cool cool.. thanks man
LJR ps. Keep on the look out for Star Traders ;) |
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) |
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() |