Jump to content
  • 0

hello to all help pls


Question

Posted (edited)

how to make input = goto?

example

map,123,123,5 script [Test Script] 105,{

mes "Hello what label you want to go??";

mes "label1 or label 2??";

next;

input .label;

goto .label;

// if input the label is incorrect we have failed message like sorry your label is not correct..

label1:

mes "this is label 1";

close;

label2:

mes "this is label 2";

close;

Edited by zaido78

5 answers to this question

Recommended Posts

Posted (edited)

if( .label == label1 ) goto label1;
if( .label == label2 ) goto label2;

label1;
//codes
close;
end;
label1;
//codes
close;
end;

This a simple ways to do it, you can give it a try

You could just do what Nochii did there, much simpler for players so they can choose from a menu, instead of inputting s set of string

Well, just my comment, since I have no idea what you are planning *cheers*

Edited by xRyusuke
Posted (edited)

map,123,123,5	script	[Test Script] 105,{
mes "Hello what label you want to go??";
mes "label1 or label 2??";
next;
input .label$;
if((.label$ != "label1") || (.label$ != "label2")){
mes "I'm sorry but your input was not a valid label";
close;
}
goto .label$;
// if input the label is incorrect we have failed message like sorry your label is not correct..

label1:
mes "this is label 1";
close;

label2:
mes "this is label 2";
close;
}

Try this. I noticed you didn't put a "$" at the end of the .label input, meaning it wouldn't of been counted as a text string.

Edited by Pavi

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.   Paste as plain text instead

  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.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...