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)
+--- Thread: error 035: argument type mismatch (argument 1) (
/showthread.php?tid=479683)
error 035: argument type mismatch (argument 1) -
StreetboyBalkan - 06.12.2013
So i have the same line with "playerid" instead of "giveplayer" and there is no error,only on this line:
Код:
GivePlayerMoney(giveplayer, RepairPrice[playerid]);
(error 035: argument type mismatch (argument 1))
Do you know what is problem?
Re: error 035: argument type mismatch (argument 1) -
SilentSoul - 06.12.2013
Show us lines above please , i mean the whole code!
Re: error 035: argument type mismatch (argument 1) -
StreetboyBalkan - 06.12.2013
Код:
COMMAND:prihvatipopravku(playerid, params[])
{
If(RepairOffer[playerid] < 999)
{
If(GetPlayerMoney(playerid) > RepairPrice[playerid])
{
If(IsPlayerInAnyVehicle(playerid))
{
new sendername[MAX_PLAYER_NAME];
new RepairCar[MAX_PLAYERS];
new giveplayer[MAX_PLAYER_NAME],string[256];
GetPlayerName(RepairOffer[playerid], giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
RepairCar[playerid] = GetPlayerVehicleID(playerid);
RepairVehicle(RepairCar[playerid]);
format(string, sizeof(string), "{0049FF}[Popravka] {FFFFFF}Vase auto je popravljeno za $%d od strane mehanicara %s.",RepairPrice[playerid],giveplayer);
SCM(playerid, PLAVA, string);
format(string, sizeof(string), "{0049FF}[Popravka] {FFFFFF}Popravio si %s-ovo auto za $%d.",sendername,RepairPrice[playerid]);
SCM(RepairOffer[playerid], PLAVA, string);
//SafeGivePlayerMoney(giveplayer, RepairPrice[playerid]);
SafeGivePlayerMoney(playerid, -RepairPrice[playerid]);
RepairOffer[playerid] = 999;
RepairPrice[playerid] = 0;
Return 1;
}
}
Else Return SCM(playerid, CRVENA, "{00A6FF}divClient: {FFFFFF}Nemas dovoljno novca.");
}
Return 1;
}
Re: error 035: argument type mismatch (argument 1) -
erminpr0 - 06.12.2013
pawn Код:
new giveplayer[MAX_PLAYER_NAME];
GetPlayerName(RepairOffer[playerid], giveplayer, sizeof(giveplayer));
'giveplayer' is string, you store giveplayerid's name there, try this:
pawn Код:
GivePlayerMoney(RepairOffer[playerid], (0-RepairPrice[playerid])); // -- the cash, not add
GivePlayerMoney(playerid, RepairPrice[playerid]); // ++ the cash to mechanic
Re: error 035: argument type mismatch (argument 1) -
StreetboyBalkan - 06.12.2013
It is working,thank you