SA-MP Forums Archive
[Please help]DCMD and STRTOK - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: [Please help]DCMD and STRTOK (/showthread.php?tid=77571)



[Please help]DCMD and STRTOK - AiVAMAN - 12.05.2009

Hello,
I was converting the STRTOK commands to DCMD, and I want to ask, the cmdtext[] is the same as params[]?

Answer me quickly, please?


Re: [Please help]DCMD and STRTOK - Weirdosport - 12.05.2009

Not quite, cmdtext[] is the entire "/blah blah"
params[] is the /blah "blah"


Re: [Please help]DCMD and STRTOK - AiVAMAN - 12.05.2009

what if I change the cmdtext[] to params[] is this the same?


Re: [Please help]DCMD and STRTOK - Weirdosport - 12.05.2009

Well you shouldn't be converting strtok to dcmd, as they're different things entirely... I think you either mean strtok -> sscanf, or strcmp -> dcmd..

If you look at the Fast Commands guide on the wiki you shouldn't need to mess around with cmdtext[] and params[] at all.


Re: [Please help]DCMD and STRTOK - AiVAMAN - 12.05.2009

I mean, I have to convert them, because I cant use the strtok or the other stuff except dcmd at filterscripts...

or any other advice??


Re: [Please help]DCMD and STRTOK - Weirdosport - 12.05.2009

Sttrok and sscanf are ways of extracting inputs from commands, dcmd and strcmp and .. command "handlers" they're the bits that see which command you're talking about in the first place.. You can use dcmd with strtok if you wish, though it'd make more sense to use dcmd and sscanf together...

I am still not sure what you're actually asking, I feel like I'm having to say the same thing to you alot here..


Re: [Please help]DCMD and STRTOK - AiVAMAN - 12.05.2009

everything works fine... thanks for your help