SA-MP Forums Archive
[EASY] Warnings +REP - 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: [EASY] Warnings +REP (/showthread.php?tid=566916)



[EASY] Warnings +REP - StarPeens - 09.03.2015

First Warning:
pawn Код:
warning 202: number of arguments does not match definition
Line:
pawn Код:
SpielerInfo[playerid][pBan] = DOF2_GetInt("accounts","Banned","Name",GetName(playerid));
Second Warning:
pawn Код:
warning 202: number of arguments does not match definition
Line:
pawn Код:
GetName(playerid),GetName(playerid),DOF2_GetString("accounts","BanReason","Name",GetName(playerid)),DOF2_GetString("accounts","BanTime","Name",GetName(playerid)),DOF2_GetString("accounts","BanDate","Name",GetName(playerid)),DOF2_GetString("accounts","BanIP","Name",GetName(playerid)));



Re: [EASY] Warnings +REP - Karan007 - 09.03.2015

Why not, try this.But i didn't test it.
Код:
GetPlayerName(playerid),GetName(playerid),DOF2_GetString("accounts","BanReason","Name",GetName(playerid)),DOF2_GetString("accounts","BanTime","Name",GetName(playerid)),DOF2_GetString("accounts","BanDate","Name",GetName(playerid)),DOF2_GetString("accounts","BanIP","Name",GetName(playerid);



Re: [EASY] Warnings +REP - Ritzy2K - 09.03.2015

it means...that ur parameteres...arent complete...like there are 4 but u used less...than 4... just an example...


Re: [EASY] Warnings +REP - StarPeens - 09.03.2015

anyone?


Re: [EASY] Warnings +REP - CalvinC - 09.03.2015

Everyone* has already replied and told you the problem.
You are using incorrect parameters, check the function and see how it's parameters are, and then use them correctly.
Example:
pawn Код:
SendRedMessage(playerid, text) return SendClientMessage(playerid, 0xFF0000FF, text);

public OnPlayerConnect(playerid) return SendRedMessage(playerid);
This is incorrect parameters.

And this is correct:
pawn Код:
SendRedMessage(playerid, text) return SendClientMessage(playerid, 0xFF0000FF, text);

public OnPlayerConnect(playerid) return SendRedMessage(playerid, "Hey");



AW: Re: [EASY] Warnings +REP - Kaliber - 09.03.2015

Quote:
Originally Posted by StarPeens
Посмотреть сообщение
anyone?
You must look at the Include functions...

Код:
DOF2_GetInt(file[],key[],tag[]="");
So you must do sth like this:

Код:
new path[32];
format(path,32,"%s.txt",GetName(playerid));
SpielerInfo[playerid][pBan] = DOF2_GetInt(path,"Banned");
And the other line...wtf?!

It should look sth like this:

Код:
format(SpielerInfo[playerid][pBanReason],128,DOF2_GetString(path,"BanReason"));
format(SpielerInfo[playerid][pBanTime],64,DOF2_GetString(path,"BanTime"));
format(SpielerInfo[playerid][pBanDate],64,DOF2_GetString(path,"BanDate"));
format(SpielerInfo[playerid][pBanIP],16,DOF2_GetString(path,"BanIP"));
But if we could see your enum, that would be better


Re: [EASY] Warnings +REP - StarPeens - 09.03.2015

appeared more mistakes ... am newbie help me, did not understand anything so far
pawn Код:
warning 202: number of arguments does not match definition
pawn Код:
GetName(playerid),GetName(playerid),DOF2_GetString("accounts","BanReason","Name",GetName(playerid)),DOF2_GetString("accounts","BanTime","Name",GetName(playerid)),DOF2_GetString("accounts","BanDate","Name",GetName(playerid)),DOF2_GetString("accounts","BanIP","Name",GetName(playerid)));
Other:
pawn Код:
warning 202: number of arguments does not match definition
pawn Код:
SpielerInfo[playerid][pBan] = DOF2_GetInt("accounts","Banned","Name",GetName(playerid));



Re: [EASY] Warnings +REP - CalvinC - 09.03.2015

Example, the function has 2 parameters:
pawn Код:
MyFunction(parameter1, parameter2)
But you're using it with either more or less parameters.

SAMP wiki:
Parameters
Number of arguments does not match definition warning