[Help] COmmand
#9

Quote:
Originally Posted by Luca Dimonte
Here

if(strcmp(cmdtext, "/InviteDrift", true) == 0)
{

tmp = strtok(cmdtext, idx);

you are comparing the whole thing typed by the player (maybe "/invitedrift 5"?), so that's different from "/Invitedrift", and will never find the command.

Later you store in tmp the playerid.

tmp = strtok(cmdtext, idx);

If you see that, you forgot to do the same in the if statement. It would be

tmp = strtok (cmdtext, idx); // added
if(strcmp(tmp, "/InviteDrift", true) == 0)
{
tmp = strtok(cmdtext, idx);
Why are you saying so?
Reply


Messages In This Thread
[Help] COmmand - by borisblat - 12.06.2009, 12:47
Re: [Help] COmmand - by Luca Dimonte - 12.06.2009, 16:36
Re: [Help] COmmand - by borisblat - 12.06.2009, 16:46
Re: [Help] COmmand - by Luca Dimonte - 12.06.2009, 17:18
Re: [Help] COmmand - by borisblat - 12.06.2009, 17:22
Re: [Help] COmmand - by Luca Dimonte - 12.06.2009, 17:24
Re: [Help] COmmand - by borisblat - 12.06.2009, 17:26
Re: [Help] COmmand - by Luca Dimonte - 12.06.2009, 17:33
Re: [Help] COmmand - by MenaceX^ - 12.06.2009, 17:35
Re: [Help] COmmand - by borisblat - 12.06.2009, 17:39

Forum Jump:


Users browsing this thread: 2 Guest(s)