for(set .@i,1; .@i < 13 ; set .@i,.@i+1){ ///// This generates a list with Job Names.
setarray .@JSName$[.@i], jobname(.@i);
}
mes .@npc$,$sep$,"Select an option."; next; for(set .@i,0; .@i < (getarraysize(.@JSName$[0])) ; set .@i,.@i+1){ /////<<<-- Need Help! switch(select(( implode( .@JSName$, ":" ) ))) { case (.@i): mes .@JSName$[.@i] close; }
I want to make a dynamic switch(select) with dynamic choices.
When I try to run the script, the server says:
script error on npc/custom/ORO/Functions/Jobs.txt line 65
parse_syntax: expected '{'
60 : next;
61 : for(set .@i,0; .@i < (getarraysize(.@JSName$[0])) ; set .@i,.@i+1)
Question
grobyczen
Hi,
Can anyone help me to make this bit of code work?
deletearray .@JSName$[0],getarraysize(.@JSName$[0]);
for(set .@i,1; .@i < 13 ; set .@i,.@i+1){ ///// This generates a list with Job Names.
setarray .@JSName$[.@i], jobname(.@i);
}
mes .@npc$,$sep$,"Select an option."; next; for(set .@i,0; .@i < (getarraysize(.@JSName$[0])) ; set .@i,.@i+1){ /////<<<-- Need Help! switch(select(( implode( .@JSName$, ":" ) ))) { case (.@i): mes .@JSName$[.@i] close; }
I want to make a dynamic switch(select) with dynamic choices.
When I try to run the script, the server says:
Any help will be apreciated.
Thanks in advance.
Link to comment
Share on other sites
1 answer to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.