Error code - 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 code (
/showthread.php?tid=163977)
Error code -
Fab10 - 29.07.2010
Код HTML:
new Leader = PlayerInfo[playerid][pLeader];
new member = PlayerInfo[playerid][pMember];
if(CarInfo[vehicleid][cFaction] != 0)
{
if(!strcmp(CarInfo[vehicleid][cFaction], Leader, false)
{} else {
SendClientMessage(playerid, COLOR_GREY, "You don't have the key of vehicle");
RemovePlayerFromVehicle(playerid);
}
}
Код HTML:
C:\Users\Tony\Desktop\LARP\gamemodes\larp.pwn(2205) : error 035: argument type mismatch (argument 2)
C:\Users\Tony\Desktop\LARP\gamemodes\larp.pwn(2202) : warning 204: symbol is assigned a value that is never used: "member"
C:\Users\Tony\Desktop\LARP\gamemodes\larp.pwn(2201) : warning 204: symbol is assigned a value that is never used: "Leader"
Re: Error code -
Carlton - 29.07.2010
pawn Код:
new Leader = PlayerInfo[playerid][pLeader];
new member = PlayerInfo[playerid][pMember];
if(CarInfo[vehicleid][cFaction] != 0)
{
if(CarInfo[vehicleid][cFaction] != Leader)
{
SendClientMessage(playerid, COLOR_GREY, "You don't have the key of vehicle");
RemovePlayerFromVehicle(playerid);
}
}
Only use strcmp for strings.
Re: Error code -
Vince - 29.07.2010
You're comparing a string with an integer, hence the argument mismatch.