Error with switch script command

jupeto

New member
Messages
39
Points
0
Github
jupeto
Code:
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
 
Last edited by a moderator:
yes you got to use the id's or the constants (e.g. Job_Acolyte)

 
Back
Top