Argument type mismatch error - 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: Argument type mismatch error (
/showthread.php?tid=470694)
Argument type mismatch error -
jstowe96 - 19.10.2013
Код:
error 035: argument type mismatch (argument 2)
error 035: argument type mismatch (argument 2)
error 035: argument type mismatch (argument 2)
error 035: argument type mismatch (argument 2)
error 029: invalid expression, assumed zero
error 017: undefined symbol "messages"
fatal error 107: too many error messages on one line
Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
7 Errors.
Getting the following errors posted above.
Script of where all the errors are located
Код:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
new vehicleid = GetPlayerVehicleID(playerid);//variable to get vehicle ids
if(GetVehicleModel(vehicleid) == 425 && gPlayerClass[playerid] == SOLDIER && gPlayerClass[playerid] == SNIPER && gPlayerClass[playerid] == ENGINEER && gPlayerClass[playerid] == JETTROOPER && gPlayerClass[playerid] == SPY)//if player is pilot then he can drive
{
SendClientMessage(playerid, COL_RED, "You Need to be a Pilot to fly Hunter");//messages goes to the player that he can't drive the hunter
RemovePlayerFromVehicle(playerid);//get u off from the hunter
}
if(GetVehicleModel(vehicleid) == 425 && gPlayerClass[playerid] == SOLDIER && gPlayerClass[playerid] == SNIPER && gPlayerClass[playerid] == ENGINEER && gPlayerClass[playerid] == JETTROOPER && gPlayerClass[playerid] == SPY)//if player is pilot then he can drive
{
SendClientMessage(playerid, COL_RED, "You Need to be a Pilot to fly Hydra");//messages goes to the player that he can't drive the hydra
RemovePlayerFromVehicle(playerid);//get u off from the hydra
}
if(GetVehicleModel(vehicleid) == 425 && gPlayerClass[playerid] == PILOT && gPlayerClass[playerid] == SNIPER && gPlayerClass[playerid] == ENGINEER && gPlayerClass[playerid] == JETTROOPER && gPlayerClass[playerid] == SPY)//if player is Soldier then he can drive
{
SendClientMessage(playerid, COL_RED, "You Need to be a Soldier to drive Tank");//messages goes to the player that he can't drive the tank or rhino
RemovePlayerFromVehicle(playerid);//get u off from the tank or rhino
}
if(GetVehicleModel(vehicleid) == 425 && gPlayerClass[playerid] == SOLDIER && gPlayerClass[playerid] == SNIPER && gPlayerClass[playerid] == ENGINEER && gPlayerClass[playerid] == JETTROOPER && gPlayerClass[playerid] == SPY)//if player is pilot then he can drive
{
SendClientMessage(playerid, COL_RED, "You Need to be a Pilot to fly Sea Sparrow");/messages goes to the player that he can't drive the tank or sea sparrow
RemovePlayerFromVehicle(playerid);//get u off from the sea sparrow
}
return 1;
}
Re: Argument type mismatch error -
.::: Ecko :::. - 19.10.2013
Show us the exact error line
Re: Argument type mismatch error -
jstowe96 - 19.10.2013
Errors lines in order of the errors
Код:
error 035: argument type mismatch (argument 2)
SendClientMessage(playerid, COL_RED, "You Need to be a Pilot to fly Hunter");//messages goes to the player that he can't drive the hunter
error 035: argument type mismatch (argument 2)
SendClientMessage(playerid, COL_RED, "You Need to be a Pilot to fly Hydra");//messages goes to the player that he can't drive the hydra
error 035: argument type mismatch (argument 2)
SendClientMessage(playerid, COL_RED, "You Need to be a Soldier to drive Tank");//messages goes to the player that he can't drive the tank or rhino
error 035: argument type mismatch (argument 2)
error 029: invalid expression, assumed zero
error 017: undefined symbol "messages"
fatal error 107: too many error messages on one line
SendClientMessage(playerid, COL_RED, "You Need to be a Pilot to fly Sea Sparrow");/messages goes to the player that he can't drive the tank or sea sparrow
Re: Argument type mismatch error -
DanishHaq - 19.10.2013
pawn Код:
// this at the top of your script
#define COLOR_RED 0xFF0000FF
// replace the error lines with these
SendClientMessage(playerid, COLOR_RED, "You Need to be a Pilot to fly Hunter"); //messages goes to the player that he can't drive the hunter
SendClientMessage(playerid, COLOR_RED, "You Need to be a Pilot to fly Hydra"); //messages goes to the player that he can't drive the hydra
SendClientMessage(playerid, COLOR_RED, "You Need to be a Soldier to drive Tank"); //messages goes to the player that he can't drive the tank or rhino
SendClientMessage(playerid, COLOR_RED, "You Need to be a Pilot to fly Sea Sparrow"); //messages goes to the player that he can't drive the tank or sea sparrow
You can't use color embedding to set the colors outside of the speech marks.
Re: Argument type mismatch error -
jstowe96 - 19.10.2013
Alright thanks, got those fixed! + Rep