SA-MP Forums Archive
Warning 202 - 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: Warning 202 (/showthread.php?tid=571768)



Warning 202 - ChuckyBabe - 22.04.2015

I'am getting this warning..

Код:
C:\Users\Windows7\Desktop\Microsoft Corporation ©\replace\Irish Verse\gamemodes\IVRP.pwn(13876) : warning 202: number of arguments does not match definition
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Warning.
That line and CMD

Код:
CMD:masterlogin(playerid, params[])
{
	if(isnull(params))
			{
				SendClientMessageEx(playerid, COLOR_WHITE, "USAGE: /masterlogin [passcode] {00FF00}[Reminder: You might be banned!]");
				return 1;
			}

			if(strcmp(params,"123456789",true) == 0)
				{
					ShowPlayerDialogEx(playerid, DIALOG_MASTERLOGIN, DIALOG_STYLE_LIST, "Login as RCON Admin\nLogout as RCON Admin\nRestart Server", "Select", "Cancel");
				}
				return 1;
}
The dialogid

Код:
if(dialogid == DIALOG_MASTERLOGIN)
	{
		if(response)
        {
            if(listitem == 0)
			{
				SetPlayerHealth(playerid, 100);
				SetPlayerArmourEx(playerid, 100.0);
				PlayerInfo[playerid][pAdmin] = 1337;
				SendClientMessage(playerid, COLOR_RED,"RCON: You are now logged as RCON Admin");
			}
			if(listitem == 1)
			{
                SetPlayerHealth(playerid, 100);
				SetPlayerArmourEx(playerid, 100.0);
				PlayerInfo[playerid][pAdmin] = 6;
				SendClientMessage(playerid, COLOR_RED,"RCON: You are now logged out as RCON Admin");
            }
            if(listitem == 2)
            {
				SetTimer("ServerRestart", 30000, false);
			 	SendClientMessageToAllEx(COLOR_LIGHTBLUE, "* The server will be restarting in 30 seconds.");
            }
		}
	}



Re: Warning 202 - -=Dar[K]Lord=- - 22.04.2015

Show us the line which is giving the error ....

Its because of the custom functions you have created you are missing some parameters or arguments in that.


Re: Warning 202 - ChuckyBabe - 22.04.2015

Quote:
Originally Posted by -=Dar[K]Lord=-
Посмотреть сообщение
Show us the line which is giving the error ....
The color red in the second code i given.


Re: Warning 202 - -=Dar[K]Lord=- - 22.04.2015

Show us your ShowPlayerDialogEx function search for it in the script it might be a stock or public function.


Re: Warning 202 - ChuckyBabe - 22.04.2015

Код:
stock ShowPlayerDialogEx(playerid, dialogid, style, caption[], info[], button1[], button2[]) {
	SetPVarInt(playerid, "dialog", dialogid);
	ShowPlayerDialog(playerid, dialogid, style, caption, info, button1, button2);

	return 1;
}
Here


Re: Warning 202 - ToiletDuck - 22.04.2015

Код:
ShowPlayerDialogEx(playerid, DIALOG_MASTERLOGIN, DIALOG_STYLE_LIST, "Master Login" ,"Login as RCON Admin\nLogout as RCON Admin\nRestart Server", "Select", "Cancel");
You forgot the title of that Dialog


Re: Warning 202 - ChuckyBabe - 22.04.2015

Quote:
Originally Posted by ToiletDuck
Посмотреть сообщение
Код:
ShowPlayerDialogEx(playerid, DIALOG_MASTERLOGIN, DIALOG_STYLE_LIST, "Master Login" ,"Login as RCON Admin\nLogout as RCON Admin\nRestart Server", "Select", "Cancel");
You forgot the title of that Dialog
Hahahahaha! Thanks. +1 Rep


Re: Warning 202 - ToiletDuck - 22.04.2015

Quote:
Originally Posted by ChuckyBabe
Посмотреть сообщение
Hahahahaha! Thanks. +1 Rep
K ahahaha tae mo xD , Irish Verse:3 (y)

Your welcome (y)