Hi Everyone,
This string split function doesn't appear to be working properly:
The code prints:
saveplayersandexit
Which is therefore the value of parts[0]. But it does not then afterward print "Saving players and exiting", indicating that that case is never called.
What's wrong here?
parts is an array<String>
This string split function doesn't appear to be working properly:
Code:
`Log(parts[0]); switch(parts[0]){ case "initclient": //send challenge response SendText(ClientInfo); break; case "assignzone": `Log("Assigning zone "$parts[1]); ZoneId=int(parts[1]); break; case "kickclient": //we need to kick the client with the character ID specified break; case "saveplayersandexit": `Log("Saving players and exiting..."); SafeExit(); break;
saveplayersandexit
Which is therefore the value of parts[0]. But it does not then afterward print "Saving players and exiting", indicating that that case is never called.
What's wrong here?
parts is an array<String>
Comment