error 033: array must be indexed (variable "cmd")
#1

Need help with this error


public OnPlayerCommandText(playerid, cmdtext[])
{

new cmd [256];
new idx;
cmd = strtok(cmdtext, idx);
Reply
#2

format(cmd, 256, strtok(cmdtext, idx));

I'd change 256 to 168 if I was you though, SA-MP max chat input/output is 167 (+1 for '\n')
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)