Warning
#1

i used this thread: how to make score, kills, deaths, skin saves

Код:
C:\Documents and Settings\Gaber\Desktop\My Samp Server\gamemodes\SFCRRPG.pwn(15085) : warning 202: number of arguments does not match definition
C:\Documents and Settings\Gaber\Desktop\My Samp Server\gamemodes\SFCRRPG.pwn(15086) : warning 202: number of arguments does not match definition
line 15085:
pawn Код:
Killz[playerid] =dUserSetINT(PlayerName(playerid)).("Kills");
line 15086:
pawn Код:
Deathz[playerid] =dUserSetINT(PlayerName(playerid)).("Deaths");
the main system is in the thread i gave above but i converted it to my saving system and had those warnings

the converted one is:
pawn Код:
//at the first of the script
new Killz[MAX_PLAYERS];       // We have used this variable because to save the kills of the player
new Deathz[MAX_PLAYERS];
pawn Код:
//under onplayerdisconnect [it saves the stats]
    dUserSetINT(PlayerName(playerid)).("Kills",Killz[playerid]); // Set's "Kills"
        dUserSetINT(PlayerName(playerid)).("Deaths",Deathz[playerid]);
pawn Код:
//unnder onplayerdeath
Killz[killerid] ++; // The killer value will be increased
Deathz[playerid] ++; // The death value will be increased
pawn Код:
//login dialog
Killz[playerid] =dUserSetINT(PlayerName(playerid)).("Kills");
Deathz[playerid] =dUserSetINT(PlayerName(playerid)).("Deaths");
pawn Код:
//reseting the variables
Killz[playerid] =0;
Deathz[playerid] =0;
pawn Код:
//under the register dialog
dUserSetINT(PlayerName(playerid)).("Kills",0);
dUserSetINT(PlayerName(playerid)).("Deaths",0);
ok if you found any errors please tell cuz i need that urgently
Reply
#2

You are using dUserSetINT to retrieve the values.
dUserSetINT is only to store the value.

You should probably use dini_Int to retrieve the value
Reply
#3

Exactly.
Код:
Killz[playerid] =dUserINT(PlayerName(playerid)).("Kills");
Same for the other line giving errors.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)