samp error 035: argument type mismatch (argument 2) -
Arnold_Collins - 23.12.2013
Got a Problem with this .. samp error 035: argument type mismatch (argument 2)
Код:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
new Float:p[3],model = GetVehicleModel(vehicleid);
if(model == 432&&GetPlayerScore(playerid)<1500)
{
GetPlayerPos(playerid,p[0],p[1],p[2]);
SetPlayerPos(playerid,p[0],p[1],p[2]);
SendClientMessage(playerid,COL_BLUE,"[ERROR]:You need to have atleast 1500 score!");
}
if(model == 425&&GetPlayerScore(playerid)<2500)
{
GetPlayerPos(playerid,p[0],p[1],p[2]);
SetPlayerPos(playerid,p[0],p[1],p[2]);
SendClientMessage(playerid,COL_BLUE,"[ERROR]:You need to have atleast 2500 score!");
}
if(model == 520&&GetPlayerScore(playerid)<3500)
{
GetPlayerPos(playerid,p[0],p[1],p[2]);
SetPlayerPos(playerid,p[0],p[1],p[2]);
SendClientMessage(playerid,COL_BLUE,"[ERROR]:You need to have atleast 3500 score!");
}
if(model == 447&&GetPlayerScore(playerid)<5000)
{
GetPlayerPos(playerid,p[0],p[1],p[2]);
SetPlayerPos(playerid,p[0],p[1],p[2]);
SendClientMessage(playerid,COL_BLUE,"[ERROR]:You need to have atleast 5000 score!");
}
return 1;
}
Re: samp error 035: argument type mismatch (argument 2) - Patrick - 23.12.2013
This code
compiles perfectly, Mind showing us the code above this?
Re: samp error 035: argument type mismatch (argument 2) -
Arnold_Collins - 23.12.2013
Down the Code .... As im trying to make the vehicles restriced for an ammount of score
Код:
//==============================================================================
//============================[ OnPlayerEnter and OnPlayerLeave Dynamic CP]=====
//==============================================================================
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
new Float:p[3],model = GetVehicleModel(vehicleid);
if(model == 432&&GetPlayerScore(playerid)<1500)
{
GetPlayerPos(playerid,p[0],p[1],p[2]);
SetPlayerPos(playerid,p[0],p[1],p[2]);
SendClientMessage(playerid,COL_BLUE,"[ERROR]:You need to have atleast 1500 scores or Being a VIP Member to drive this vehicle!");
}
if(model == 425&&GetPlayerScore(playerid)<1200)
{
GetPlayerPos(playerid,p[0],p[1],p[2]);
SetPlayerPos(playerid,p[0],p[1],p[2]);
SendClientMessage(playerid,COL_BLUE,"[ERROR]:You need to have atleast 1200 scores or Being a VIP Member to drive this vehicle!");
}
if(model == 520&&GetPlayerScore(playerid)<1200)
{
GetPlayerPos(playerid,p[0],p[1],p[2]);
SetPlayerPos(playerid,p[0],p[1],p[2]);
SendClientMessage(playerid,COL_BLUE,"[ERROR]:You need to have atleast 1200 scores or Being a VIP Member to drive this vehicle!");
}
if(model == 447&&GetPlayerScore(playerid)<1000)
{
GetPlayerPos(playerid,p[0],p[1],p[2]);
SetPlayerPos(playerid,p[0],p[1],p[2]);
SendClientMessage(playerid,COL_BLUE,"[ERROR]:You need to have atleast 1000 scores or Being a VIP Member to drive this vehicle!");
}
return 1;
}
public OnPlayerEnterDynamicCP(playerid, checkpointid)
{
if(checkpointid == CP[SNAKE])
{
if(IsLogged[playerid] == 1) {
if(UnderAttack[SNAKE] == 0) {
if(Team[playerid] != MERCENARY) {
if(tCP[SNAKE] != Team[playerid]) {
CountVar[playerid][SNAKE] = 25;
ActiveSnakeFarm(playerid);
} else return SendClientMessage(playerid, -1,"*"COL_WHITE"This zone is already captured by your team.");
} else return CaptureZoneMessage(playerid, 3);
} else return CaptureZoneMessage(playerid, 2);
} else return 0;
}
else if(checkpointid == CP[BAY])
{
if(IsLogged[playerid] == 1) {
if(UnderAttack[BAY] == 0) {
if(Team[playerid] != MERCENARY) {
if(tCP[BAY] != Team[playerid]) {
CountVar[playerid][BAY] = 25;
ActiveBay(playerid);
} else return SendClientMessage(playerid, -1,"*"COL_WHITE"This zone is already captured by your team.");
} else return CaptureZoneMessage(playerid, 3);
} else return CaptureZoneMessage(playerid, 2);
} else return 0;
}
Up the Code
Код:
new str[128];
format(str, sizeof(str),""COL_RED" %s "COL_WHITE"has captured \"Big Ear\" for team %s", PlayerName(playerid), GetTeamName(playerid));
SendClientMessageToAll(-1, str);
return 1;
}
stock LeavingEar(playerid)
{
for(new num = 0; num < 4; num ++)
{ TextDrawHideForPlayer(playerid, ZoneTextdraw_[num][playerid]); }
Captured[playerid][EAR] = 1;
UnderAttack[EAR] = 0;
KillTimer(timer[playerid][EAR]);
CountVar[playerid][EAR] = 25;
GangZoneStopFlashForAll(Zone[EAR]);
for(new i = 0; i < MAX_PLAYERS; i++)
{
IsPlayerCapturing[i][EAR] = 0;
}
SendClientMessage(playerid, -1,"*"COL_WHITE"You have been failed to capture this zone.");
PlayAudioStreamForPlayer(playerid, "http://files.mboxdrive.com/100000435279790/failed%20capture.MP3");
return 1;
}
forward BigEar(playerid);
public BigEar(playerid)
{
EarCaptured(playerid);
return 1;
}
Re: samp error 035: argument type mismatch (argument 2) -
Konstantinos - 23.12.2013
You should say which one is the line which gave the error.
Anyways, I believe it's caused by
COL_BLUE.
How did you define it?
Re: samp error 035: argument type mismatch (argument 2) - Patrick - 23.12.2013
I agree with
Konstantinos
If
COL_BLUE is defined like this.
pawn Код:
#define COL_BLUE "{0049FF}"
then you should change it
pawn Код:
#define COL_BLUE 0x0049FF
not to affect your other code, use this code
pawn Код:
#define COLOR_BLUE 0x0049FF
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
new Float:p[3],model = GetVehicleModel(vehicleid);
if(model == 432&&GetPlayerScore(playerid)<1500)
{
GetPlayerPos(playerid,p[0],p[1],p[2]);
SetPlayerPos(playerid,p[0],p[1],p[2]);
SendClientMessage(playerid, COLOR_BLUE,"[ERROR]:You need to have atleast 1500 score!");
}
if(model == 425&&GetPlayerScore(playerid)<2500)
{
GetPlayerPos(playerid,p[0],p[1],p[2]);
SetPlayerPos(playerid,p[0],p[1],p[2]);
SendClientMessage(playerid, COLOR_BLUE,"[ERROR]:You need to have atleast 2500 score!");
}
if(model == 520&&GetPlayerScore(playerid)<3500)
{
GetPlayerPos(playerid,p[0],p[1],p[2]);
SetPlayerPos(playerid,p[0],p[1],p[2]);
SendClientMessage(playerid, COLOR_BLUE,"[ERROR]:You need to have atleast 3500 score!");
}
if(model == 447&&GetPlayerScore(playerid)<5000)
{
GetPlayerPos(playerid,p[0],p[1],p[2]);
SetPlayerPos(playerid,p[0],p[1],p[2]);
SendClientMessage(playerid, COLOR_BLUE,"[ERROR]:You need to have atleast 5000 score!");
}
return 1;
}
Re: samp error 035: argument type mismatch (argument 2) -
FakkChass - 23.12.2013
5arya!
Re: samp error 035: argument type mismatch (argument 2) -
Arnold_Collins - 23.12.2013
Yep if i fix it and change the color it gives me a lot of errors or it simply crashes this is my defined colors
Код:
#define COL_WHITE "{FFFFFF}"
#define COL_BLACK "{0E0101}"
#define COL_GREY "{C3C3C3}"
#define COL_GREEN "{6EF83C}"
#define COL_RED 0xAA3333AA
#define COL_YELLOW "{F3FF02}"
#define COL_ORANGE "{FFAF00}"
#define COL_LIME "{B7FF00}"
#define COL_CYAN "{00FFEE}"
#define COL_BLUE "{0049FF}"
#define COL_MAGENTA "{F300FF}"
#define COL_VIOLET "{B700FF}"
#define COL_PINK "{FF00EA}"
#define COL_MARONE "{A90202}"
#define COLOR_GREY 0xAFAFAFAA
#define COLOR_GREY 0xAFAFAFAA
#define COLOR_GREEN 0x33AA33AA
#define COLOR_RED 0xAA3333AA
#define COLOR_YELLOW 0xFFFF00AA
#define COLOR_WHITE 0xFFFFFFAA
#define COLOR_LIGHTGREEN 0x7FFF00
#define COLOR_DARKGREEN 0x006400
#define COLOR_LIGHTBLUE 0x91C8FF
#define COLOR_ORANGE 0xFF9900AA
#define COLOR_GROUPTALK 0x87CEEBAA
#define COLOR_MENU 0xFFFFFFAA
#define COLOR_SYSTEM_PM 0x66CC00AA
#define COLOR_SYSTEM_PW 0xFFFF33AA
Re: samp error 035: argument type mismatch (argument 2) -
Konstantinos - 23.12.2013
Let the COL_BLUE as it is because it may be used by some other code.
Add this to the colours:
pawn Код:
#define COLOR_BLUE 0x0049FFFF
And replace any line that gives error 035: argument type mismatch (argument 2) and uses COL_BLUE to COLOR_BLUE.
Re: samp error 035: argument type mismatch (argument 2) -
Arnold_Collins - 23.12.2013
It works.. Thank's a lot guys..