Jump to content
  • 0
schan

How to use 'prompt' in script?

Question

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!

Share this post


Link to post
Share on other sites

3 answers to this question

Recommended Posts

  • 0

ex:

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;}

Share this post


Link to post
Share on other sites
  • 0

"'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:

switch(prompt("yes:no")){

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.