SA-MP Forums Archive
Error argument. - 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: Error argument. (/showthread.php?tid=458125)



Error argument. - JacobWilkerson - 15.08.2013

Hi.

Hello to you. When I compile my GM I get three errors in dfferent lines, but I do not see where the errors come ...

pawn Код:
if(oldstate-1 && newstate) TextDrawHideForPlayer(playerid, sFuel[playerid]), TextDrawHideForPlayer(playerid, Jesaispas), TextDrawHideForPlayer(playerid, Transmission[playerid]), TextDrawHideForPlayer(playerid, Vitesse[playerid]); else if(newstate-1) TextDrawShowForPlayer(playerid, Jesaispas), TextDrawShowForPlayer(playerid, sFuel[playerid]), format(string, sizeof(string), "~y~Carburant: ~w~%d L", Fuel[GetPlayerVehicleID(playerid)]),
TextDrawSetString(sFuel[playerid], string), TextDrawShowForPlayer(playerid, Vitesse[playerid]), TextDrawShowForPlayer(playerid, Transmission[playerid]), format(string,sizeof(string),"~y~Vitesse: ~w~0 km/h"), TextDrawSetString(Vitesse[playerid], string), format(string,sizeof(string),"~y~Transmission: ~w~N"), TextDrawSetString(Transmission[playerid], string);
pawn Код:
TextDrawHideForPlayer(playerid, sFuel[playerid]), TextDrawHideForPlayer(playerid, Jesaispas), TextDrawHideForPlayer(playerid, Transmission[playerid]), TextDrawHideForPlayer(playerid, Vitesse[playerid]);
All code is in callback OnPlayerStateChange.

Can you help me?


Re : Error argument. - JacobWilkerson - 15.08.2013

This error : error 035: argument type mismatch (argument 2)


Re: Error argument. - Lyksus - 15.08.2013

pawn Код:
if(oldstate-1 && newstate)
Maybe try this?:
pawn Код:
if(oldstate == PLAYER_STATE_ONFOOT && newstate == PLAYER_STATE_DRIVER
Untested but i dont see what you were trying to code there as there is nothing for the newstate?:S

If I helped why not drop a +rep? Please don't -rep if you don't want to, it's just courteous to do so.

EDIT: misread, try this too:

pawn Код:
TextDrawHideForPlayer(playerid, sFuel[playerid]);
 TextDrawHideForPlayer(playerid, Jesaispas);
 TextDrawHideForPlayer(playerid, Transmission[playerid]);
 TextDrawHideForPlayer(playerid, Vitesse[playerid]);



Re : Error argument. - JacobWilkerson - 15.08.2013

Not work.
I have 5 errors now...


Re : Error argument. - JacobWilkerson - 15.08.2013

UP please.