number of arguments does not match definition
#1

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
Reply
#2

pawn Код:
new Float: Health, Float: Armour;
GetPlayerHealth(playerid, Health);
GetPlayerArmour(playerid, Armour);
They don't return a value.
Reply
#3

also, its just a warning your script will still work
Reply
#4

Thanks all
Reply
#5

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.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)