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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...

Important Information

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