SA-MP Forums Archive
Stock SendToAdmins +rep for helping me! - 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: Stock SendToAdmins +rep for helping me! (/showthread.php?tid=537028)



Stock SendToAdmins +rep for helping me! - MrCallum - 13.09.2014

I get an error with my stock which is used in my command!

Код:
C:\Users\Callum.Acer\Desktop\Scripting extra\gamemodes\Gamemode.pwn(89) : error 017: undefined symbol "Player"
C:\Users\Callum.Acer\Desktop\Scripting extra\gamemodes\Gamemode.pwn(89) : warning 215: expression has no effect
C:\Users\Callum.Acer\Desktop\Scripting extra\gamemodes\Gamemode.pwn(89) : error 001: expected token: ";", but found "]"
C:\Users\Callum.Acer\Desktop\Scripting extra\gamemodes\Gamemode.pwn(89) : error 029: invalid expression, assumed zero
C:\Users\Callum.Acer\Desktop\Scripting extra\gamemodes\Gamemode.pwn(89) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase

4 Errors.
Stock:

Код:
stock SendToAdmins(playerid, color, text[])
{
	for(new i; i < MAX_PLAYERS; i++)
	{
	    if(Player[i][pAdmin] >= 1) // Line 89
	    {
	        SendClientMessage(i, color, text);
		}
	}
	return 1;
}



Re: Stock SendToAdmins +rep for helping me! - PMH - 13.09.2014

You're not using the correct variable for admins
u need to define the correct one


Re: Stock SendToAdmins +rep for helping me! - Ricagor - 13.09.2014

put this except " if(Player[i][pAdmin] >= 1) // Line 89"
Put this : LevelCheck( playerid, 1 );
Check


Re: Stock SendToAdmins +rep for helping me! - biker122 - 13.09.2014

Show us the enum where you've placed pAdmin


Re: Stock SendToAdmins +rep for helping me! - MrCallum - 13.09.2014

I have placed it
Quote:

enum PlayerInfo
{
Pass[129],
pAdmin,
pMod,
pMoney,
pLevels
}




Re: Stock SendToAdmins +rep for helping me! - [XST]O_x - 13.09.2014

Add this:
pawn Код:
new Player[MAX_PLAYERS][PlayerInfo];



Re: Stock SendToAdmins +rep for helping me! - MrCallum - 13.09.2014

When i try
Quote:

new Player[MAX_PLAYERS][PlayerInfo];

I get 6 errors!


Re: Stock SendToAdmins +rep for helping me! - Ghazal - 13.09.2014

Actually, it should be
pawn Код:
new Player;
or,
pawn Код:
enum PlayerData
{
   Player
};
new PlayerInfo[MAX_PLAYERS][PlayerData]; //Variable that stores enumerator above



Re: Stock SendToAdmins +rep for helping me! - biker122 - 13.09.2014

Can you show 2-3 more lines which are placed after enum?


Re: Stock SendToAdmins +rep for helping me! - MrCallum - 13.09.2014

Still 4 Errors!