SA-MP Forums Archive
Bad ERRORS - 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: Bad ERRORS (/showthread.php?tid=227345)



Bad ERRORS - New Ilyass - 17.02.2011

Код:
public OnPlayerCommandText(playerid, cmdtext[]){

  	new cmd[256],idx;
	cmd = strtok(cmdtext, idx);

if (strcmp("/goto", cmdtext, true, 10) == 0)
{
    if(AccInfo[playerid][Level] >= 1 || IsPlayerAdmin(playerid))
	{
	    if(!strlen(params)) return
		SendClientMessage(playerid, LIGHTBLUE2, "Usage: /goto [PlayerID]") &&;
	    new player1;
		new string[128];
		if(!IsNumeric(params))
		player1 = ReturnPlayerID(params);
	   	else player1 = strval(params);
	 	if(IsPlayerConnected(player1) && player1 != INVALID_PLAYER_ID && player1 != playerid)
		 {
			SendCommandToAdmins(playerid,"Goto");
			new Float:x, Float:y, Float:z;	GetPlayerPos(player1,x,y,z);
			SetPlayerInterior(playerid,GetPlayerInterior(player1));
			SetPlayerVirtualWorld(playerid,GetPlayerVirtualWorld(player1));
			if(GetPlayerState(playerid) == 2)
			{
			SetVehiclePos(GetPlayerVehicleID(playerid),x+3,y,z);
			LinkVehicleToInterior(GetPlayerVehicleID(playerid),GetPlayerInterior(player1));
			SetVehicleVirtualWorld(GetPlayerVehicleID(playerid),GetPlayerVirtualWorld(player1));
			}
			else SetPlayerPos(playerid,x+2,y,z);
			format(string,sizeof(string),"|- You have Teleported to \"%s\" -|", pName(player1));
			return SendClientMessage(playerid,BlueMsg,string);
		}
		else return ErrorMessages(playerid, 4);
	}
	else return ErrorMessages(playerid, 1);
}
D:\Ilyass's Documents\NYG Server\filterscripts\admin_cmds.pwn(145) : error 017: undefined symbol "AccInfo"
D:\Ilyass's Documents\NYG Server\filterscripts\admin_cmds.pwn(145) : warning 215: expression has no effect
D:\Ilyass's Documents\NYG Server\filterscripts\admin_cmds.pwn(145) : error 001: expected token: ";", but found "]"
D:\Ilyass's Documents\NYG Server\filterscripts\admin_cmds.pwn(145) : error 029: invalid expression, assumed zero
D:\Ilyass's Documents\NYG Server\filterscripts\admin_cmds.pwn(145) : fatal error 107: too many error messages on one line

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


4 Errors.


Re: Bad ERRORS - Sascha - 17.02.2011

add this to the top of your script:

pawn Код:
enum Infos
{
    Level
}
new AccInfo[MAX_PLAYERS][Infos];



Re : Bad ERRORS - New Ilyass - 17.02.2011

i have already
enum pInfo
{
pAdminLevel,
pCash,
pScore,
}
new PlayerInfo[MAX_PLAYERS][pInfo];
new gPlayerLogged[MAX_PLAYERS];


Re: Bad ERRORS - Sascha - 17.02.2011

then use PlayerInfo instead of AccInfo.,..
AccInfo is not defined, therefor you can't use it...