Jump to content
  • 0
Sign in to follow this  
jupeto

Error with switch script command

Question

switch (jobname(Class)) {
    case "Acolyte":
        mes "I'm an Acolyte";
        break;
    case "Thief":
        mes "I'm a Thief";
        break;
    case "Merchant":
        mes "I'm a Merchant";
        break;
}

 

 

 Above example produces
 
script error in file
parse syntax: expect ':'
 
(pointed in the double quotation mark after the case in `case "Acolyte"`)
 
 
Please enlighten me... Thanks
 
EDIT: fixed by just using the Class id for each job, thanks
Edited by jupeto

Share this post


Link to post
Share on other sites

1 answer to this question

Recommended Posts

  • 0

yes you got to use the id's or the constants (e.g. Job_Acolyte)

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...
Sign in to follow this  

×
×
  • Create New...

Important Information

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