04.03.2015, 14:11
Instead of
try
or something like that. Strval should work fine for getting the id from the string ![Smiley](images/smilies/smile.png)
Add some debugging code like printf(target); etc, to see what the value of the variable is when you are using it in the SendClientMessage. Printing variables always helps to find problems.![Cheesy](images/smilies/biggrin.png)
I haven't tested so I don't know if that is the problem, but I have never used the "u" character before in sscanf, so I just assume its something to do with that, but maybe not. I cant see any other problems as such.
Quote:
if(sscanf(params,"u",target)) return SendClientMessage(playerid,-1,"**Usage: /duel <playerid>"); |
Quote:
target = strval(params); |
![Smiley](images/smilies/smile.png)
Add some debugging code like printf(target); etc, to see what the value of the variable is when you are using it in the SendClientMessage. Printing variables always helps to find problems.
![Cheesy](images/smilies/biggrin.png)
I haven't tested so I don't know if that is the problem, but I have never used the "u" character before in sscanf, so I just assume its something to do with that, but maybe not. I cant see any other problems as such.