Warning.. help me in this please -
Krauser123 - 22.06.2016
I'm just getting this warning and i don't know why it's coming..
Код:
C:\Users\Krauser\Desktop\New folder (4)\filterscripts\tokens.pwn(78) : warning 202: number of arguments does not match definition
C:\Users\Krauser\Desktop\New folder (4)\filterscripts\tokens.pwn(78) : warning 202: number of arguments does not match definition
C:\Users\Krauser\Desktop\New folder (4)\filterscripts\tokens.pwn(80) : warning 202: number of arguments does not match definition
C:\Users\Krauser\Desktop\New folder (4)\filterscripts\tokens.pwn(80) : warning 202: number of arguments does not match definition
PHP код:
if(PlayerInfo[playerid][ptokens] >= amount)
{
PlayerInfo[TarID][ptokens] += amount;
PlayerInfo[playerid][ptokens] -= amount;
format(string, sizeof(string), "You have recieved %d Tokens from %s.", amount, GetPlayerName(playerid));
SendClientMessage(TarID, COLOR_GRAD2, string);
format(string, sizeof(string), "You have given %s %d Tokens.", GetPlayerName(TarID), amount);
SendClientMessage(playerid, COLOR_GRAD2, string);
}
Line 78 and Line 80
PHP код:
78 format(string, sizeof(string), "You have recieved %d Tokens from %s.", amount, GetPlayerName(playerid));
79 SendClientMessage(TarID, COLOR_GRAD2, string);
80 format(string, sizeof(string), "You have given %s %d Tokens.", GetPlayerName(TarID), amount);
81 SendClientMessage(playerid, COLOR_GRAD2, string);
Re: Warning.. help me in this please -
[XST]O_x - 22.06.2016
Check your GetPlayerName function
Re: Warning.. help me in this please -
Krauser123 - 22.06.2016
Explain please i'm new at scripting
Re: Warning.. help me in this please -
sKJaoSAMP - 22.06.2016
Open your gamemode, and search for
GetPlayerName(playerid, name, sizeof(name));
Re: Warning.. help me in this please -
Krauser123 - 22.06.2016
Can't Find it
Re: Warning.. help me in this please -
sKJaoSAMP - 22.06.2016
Try This.
Код:
if(PlayerInfo[playerid][ptokens] >= amount)
{
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof(name));
PlayerInfo[TarID][ptokens] += amount;
PlayerInfo[playerid][ptokens] -= amount;
format(string, sizeof(string), "You have recieved %d Tokens from %s.", amount, GetPlayerName(playerid));
SendClientMessage(TarID, COLOR_GRAD2, string);
format(string, sizeof(string), "You have given %s %d Tokens.", GetPlayerName(TarID), amount);
SendClientMessage(playerid, COLOR_GRAD2, string);
}
Re: Warning.. help me in this please -
oMa37 - 22.06.2016
Why don't make something easier?
Add this somewhere in your script:
PHP код:
GetName(playerid)
{
new pName[MAX_PLAYER_NAME];
GetPlayerName(playerid, pName, MAX_PLAYER_NAME);
return pName;
}
And your code:
PHP код:
if(PlayerInfo[playerid][ptokens] >= amount)
{
PlayerInfo[TarID][ptokens] += amount;
PlayerInfo[playerid][ptokens] -= amount;
format(string, sizeof(string), "You have recieved %d Tokens from %s.", amount, GetName(playerid));
SendClientMessage(TarID, COLOR_GRAD2, string);
format(string, sizeof(string), "You have given %s %d Tokens.", GetName(TarID), amount);
SendClientMessage(playerid, COLOR_GRAD2, string);
}
Re: Warning.. help me in this please -
Krauser123 - 22.06.2016
Solved Thanks everyone
Re: Warning.. help me in this please -
sKJaoSAMP - 22.06.2016
Quote:
Originally Posted by Krauser123
Solved Thanks everyone
|
It's nothing!