dcmd question.
#1

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.
Reply
#2

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.
Reply
#3

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.
Reply
#4

nothing?
Reply
#5

Well, what kind of variable is "playerid" and did you change anything at your dcmd #define?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)