dcmd question. - 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: dcmd question. (
/showthread.php?tid=102035)
dcmd question. -
_CHoz - 13.10.2009
Basically, I've tried to use one of my dcmds command at ShowPlayerClickOptions,
So this is what i've done [don't mind the 'cmdtext' var, theres a reason for that].
Code:
if ( ! strcmp(cmdtext, "Kill", true) )
return dcmd_kill(playerid, strval(clickedplayerid));
Now this is the error i get:
Code:
error 035: argument type mismatch (argument 1)
what should i do?
strval won't work.
Re: dcmd question. -
Extremo - 13.10.2009
Well, dcmd's second parameter is not a variable, it is a string. So, do make this work, you just don't use strval, instead you proceed a string. e.g:
pawn Code:
new string[32];
format(string, sizeof(string), "%d", strval(clickedplayerid));
return dcmd_kill(playerid, string);
You can't proceed integer-variables when the function is expecting string-variables.
Re: dcmd question. -
_CHoz - 13.10.2009
Nah, same error.
I think that the problem is with the first parameter...
the second one would have return an error if i wouldn't use strval on it, but when i use strval the problem is just with the first one.
Re: dcmd question. -
_CHoz - 13.10.2009
nothing?
Re: dcmd question. -
Extremo - 13.10.2009
Well, what kind of variable is "playerid" and did you change anything at your dcmd #define?