SA-MP Forums Archive
strtok annoying issue - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: strtok annoying issue (/showthread.php?tid=288301)



strtok annoying issue - Rob_Maate - 07.10.2011

G'day. I'm writing a RP script - I DID start with GF, but thought "fuck it".

So I wrote a completely new one, copied over some of my edited script and wend underway.

my issue is simple... some of my commands always only affect ID 0

For instance, a player with the name of John_Smith, who is ID 9...

Using John as the identifier returns ID 0

Using ID 9 returns ID 0.

I DONT GET IT

Also - Some of my commands are fine - It just doesn't make sense.


Re: strtok annoying issue - System64 - 07.10.2011

use sscanf and ycmd/zcmd


Re: strtok annoying issue - aRoach - 07.10.2011

Give us one of the commands that give you the Problems....

PS: Why did you not Use ZCMD/Y_CMD with SSCANF ?


Re: strtok annoying issue - Rob_Maate - 22.11.2011

short answer - when I started i'd never used ZCMD, so I stuck with what I knew.
Now my GM is over 40k lines, and it lags like a bitch if enough people connect.
Really should have tbh xD


Re: strtok annoying issue - Steven82 - 22.11.2011

So spend the time to rewrite the commands to use sscanf and zcmd.