How to use 'prompt' in script?

schan

New member
Messages
60
Points
0
Github
xschan
Emulator
Hi,

How to use ' prompt ' ?

http://herc.ws/wiki/Menus

I tried doing this:

prompt ("Yes:No");case 1:mes "Yes";case 2:mes "No";if (@menu == 255) { mes "You should not have closed the menu... BAD BOY!"; close; } 

like in switch(select()) but it didn't work.

Just give me an example on how to use this.

Thank you!

 
ex:

Code:
switch(prompt ("Yes:No")) {case 1:	mes "Yes";	close;case 2:	mes "No";	close;case 255:	mes "You should not have closed the menu... BAD BOY!"	close;}
 
"'prompt' works almost the same as select, except that when a character clicks the Cancel button, this function will return 255 instead."

You should use it with a switch as well, something like:

Code:
switch(prompt("yes:no")){
 
Thank you guys!
default_biggrin.png


 
Back
Top