error 035: argument type mismatch (argument 1) - 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: error 035: argument type mismatch (argument 1) (
/showthread.php?tid=271620)
error 035: argument type mismatch (argument 1) -
Jack_Leslie - 25.07.2011
"error 035: argument type mismatch (argument 1)"
pawn Код:
forward SaveComponent(vehicleid,componentid,playerid);
public SaveComponent(vehicleid,componentid,playerid)
{
if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER) {
if (strcmp(vehicleid,PlayerInfo[playerid][CarLinkID],false) == 0)
That part of the code is where the error is.
Re: error 035: argument type mismatch (argument 1) -
a32112365445 - 25.07.2011
Do you mean:
if(vehicleid == PlayerInfo[playerid][CarLinkID])
Re: error 035: argument type mismatch (argument 1) -
Jack_Leslie - 25.07.2011
Yeah, it's meant to ask if the vehicle id equals PlayerInfo[playerid][CarLinkID] but I think I did it wrong
Re: error 035: argument type mismatch (argument 1) -
iPLEOMAX - 25.07.2011
strcmp is used for string comparisons, you are trying to compare integers.
Just use normal "if(vehicleid == PlayerInfo[playerid][CarLinkID])..."