number of arguments does not match definition - 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: number of arguments does not match definition (
/showthread.php?tid=301817)
number of arguments does not match definition -
xMichaelx - 05.12.2011
Heya,
So i am currently learning MySQL. I have just followed a tutorial on how to make a register and login system, seems very simple however i am stuck
pawn Код:
public OnPlayerDisconnect(playerid, reason)
{
if(Logged[playerid] == 1)
{
new Float:Health = GetPlayerHealth(playerid);
new Float:Armour = GetPlayerArmour(playerid);
new Score = GetPlayerScore(playerid);
new Money = GetPlayerMoney(playerid);
new query[200], pname[24];
GetPlayerName(playerid, pname, 24);
format(query, sizeof(query), "UPDATE PlayerInfo SET Score=%d, Money=%d, Health=%d, Armour=%d WHERE Username='%s'",Score,Money,Health,Armour,pname);
mysql_query(query);
}
return 1;
}
Basically the new Float:Health and Float:Armour weren't in the tutorial but i remember something similar from using Y_ini unfortunately this gives me 2 warnings:
Код:
C:\Users\Admin\Desktop\SAMP\Los Santos Cops And Robbers 0.3d\gamemodes\LSCNR_MySQL.pwn(116) : warning 202: number of arguments does not match definition
C:\Users\Admin\Desktop\SAMP\Los Santos Cops And Robbers 0.3d\gamemodes\LSCNR_MySQL.pwn(117) : warning 202: number of arguments does not match definition
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
2 Warnings.
Could someone help me with the coding of this ? Thanks
Re: number of arguments does not match definition - [L3th4l] - 05.12.2011
pawn Код:
new Float: Health, Float: Armour;
GetPlayerHealth(playerid, Health);
GetPlayerArmour(playerid, Armour);
They don't return a value.
Re: number of arguments does not match definition -
SnG.Scot_MisCuDI - 05.12.2011
also, its just a warning your script will still work
Re: number of arguments does not match definition -
xMichaelx - 05.12.2011
Thanks all
Re: number of arguments does not match definition -
-Rebel Son- - 05.12.2011
Quote:
Originally Posted by ******
That's just not true! SOME warnings can be ignored IF you understand WHY the warning happens and you are sure that the behaviour you want is not the same as the normal behaviour, others are often indications that your mode won't work properly.
|
exactly, Espicully that one.