SA-MP Forums Archive
Please Help 1 Error - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Please Help 1 Error (/showthread.php?tid=106204)



Please Help 1 Error - WoodRunner - 01.11.2009

Hello
i know that is not the hardest error but i don't know what i have to do... please help

Код:
C:\Users\Johann\Desktop\TES.pwn(2696) : warning 209: function "OnPlayerConnect" should return a value
C:\Users\Johann\Desktop\TES.pwn(33567) : error 033: array must be indexed (variable "AWpRegpLog")
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.
Код:
public ConnectPlayer(playerid)
{
	new plname[MAX_PLAYER_NAME];
	new string[MAX_PLAYER_NAME];
	format(string, sizeof(string), "%s.ini", plname);
	for(new i; i<MAX_PLAYERS; i++)
	{
		if(IsPlayerConnected(i) && i != playerid)
		{
			if(AWpRegpLog == 1)
			{
		 	if(fexist(string))
			{
				gPlayerAccount[playerid] = 1;
				SendClientMessage(playerid, COLOR_BLUE, "-------------------------------------------------------------------------------------------------------------------------");
				SendClientMessage(playerid, COLOR_LIGHTRED, "[ACHTUNG]: Registriere dich bitte auf unserer Homepage und unserem Forum: www.fun-reallife.ucoz.com");
				SendClientMessage(playerid, COLOR_BLUE, "-------------------------------------------------------------------------------------------------------------------------");
				SendClientMessage(playerid, COLOR_YELLOW, "[SERVER]: Dein Name ist registriert sie kцnnen sich mit /login [passwort] Einloggen.");
				SendClientMessage(playerid, COLOR_YELLOW, "[SERVER]: Bitte logge dich mit /login [Passwort] ein.");
				SendClientMessage(playerid, COLOR_YELLOW, "[SERVER]: Bitte wдhle dir keinen Charakter aus, da du sonst automatisch gekickt wirst!");
				SendClientMessage(playerid, COLOR_BLUE, "-------------------------------------------------------------------------------------------------------------------------");
				return 1;
			}
			else
			{
				gPlayerAccount[playerid] = 0;
				SendClientMessage(playerid, COLOR_BLUE, "-------------------------------------------------------------------------------------------------------------------------");
				SendClientMessage(playerid, COLOR_ORANGE, "[ACHTUNG]: Registriere dich bitte auf unserer Homepage und unserem Forum: ww.fun-reallife.ucoz.com");
		    SendClientMessage(playerid, COLOR_BLUE, "-------------------------------------------------------------------------------------------------------------------------");
				SendClientMessage(playerid,COLOR_YELLOW,"[SERVER]: Bitte Registrier dich bei uns mit /register [password] und wдhlen sie keinen Skin aus !");
				SendClientMessage(playerid,COLOR_YELLOW,"[SERVER]: Sonst werden sie vom System automatisch gekickt !");
				SendClientMessage(playerid, COLOR_BLUE, "-------------------------------------------------------------------------------------------------------------------------");
				return 1;
				}
			}
		}
	}
	return 1;
}



Re: Please Help 1 Error - dice7 - 01.11.2009

AWpRegpLog[i] IF you have it declared AWpRegpLog[MAX_PLAYERS] or something and put a return 1; under OnPlayerConnect