Error 035 - 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 (
/showthread.php?tid=281337)
Error 035 -
Superthijs - 05.09.2011
What is this error? It says that there is an 'error 035: argument type mismatch' on the giveplayermoney line (argument 1).
Код:
if(!strcmp(cmd, "/gm"))
{
new Float:receiver[MAX_PLAYER_NAME];
new Float:amount[10];
GivePlayerMoney(receiver,amount);
return 1;
}
Re: Error 035 -
Kingunit - 05.09.2011
Use GivePlayerMoney like this:
pawn Код:
GivePlayerMoney(playerid, 10000);
Re: Error 035 -
iggy1 - 05.09.2011
pawn Код:
if(!strcmp(cmd, "/gm"))
{
new receiver[MAX_PLAYER_NAME];
new amount[10];
GivePlayerMoney(receiver,amount);
return 1;
}
Money or playerid are not floats they are ints. That command will also not work. Read some tutorials.
Re: Error 035 -
Superthijs - 05.09.2011
Okay, I will try that first.
Re: Error 035 -
Superthijs - 05.09.2011
Well, it keeps me telling 'argument 1 mismatch'.
Re: Error 035 -
iggy1 - 05.09.2011
How silly of me i never noticed you was using an array.
pawn Код:
if(!strcmp(cmd, "/gm"))
{
new receiver;
new amount;
GivePlayerMoney(receiver,amount);
return 1;
}
That'll remove the warning but the command still wont work because the variables don't hold any values.
Re: Error 035 -
Superthijs - 05.09.2011
But I used sscanf for the parameters.
Re: Error 035 -
Superthijs - 05.09.2011
Thanks iggy1, it worked perfectly for me!