08.02.2012, 16:15
with this code :
Whene i complie i don't have any errors , but whene i remove the "/*" and "*/"
it gives to me 4 errors :
my enum :
i hope you help me to fix those errors
pawn Код:
public OnPlayerSpawn(playerid)
{
SetTimerEx("CheckThings",5000,1,"i",playerid);
new cfile[100]; format(cfile,100,"ERegLog/Config/Config.ini");
new file[100],Name[MAX_PLAYER_NAME]; GetPlayerName(playerid,Name,MAX_PLAYER_NAME); format(file,sizeof(file),PlayerFile,Name);
if(cInfo[SkinLoad] == 1)
{
SetPlayerSkin(playerid,dini_Int(file,"Skin"));
}
else
{
return 1;
}
if(cInfo[WantedLevelLoad] == 1)
{
SetPlayerWantedLevel(playerid,dini_Int(file,"Wanted Level"));
}
else
{
return 1;
}
if(cInfo[WeaponsLoad] == 1)
{
GivePlayerWeapon(playerid,dini_Int(file,"Weapon 1"),dini_Int(file,"Ammo 1"));
GivePlayerWeapon(playerid,dini_Int(file,"Weapon 2"),dini_Int(file,"Ammo 2"));
GivePlayerWeapon(playerid,dini_Int(file,"Weapon 3"),dini_Int(file,"Ammo 3"));
GivePlayerWeapon(playerid,dini_Int(file,"Weapon 4"),dini_Int(file,"Ammo 4"));
GivePlayerWeapon(playerid,dini_Int(file,"Weapon 5"),dini_Int(file,"Ammo 5"));
GivePlayerWeapon(playerid,dini_Int(file,"Weapon 6"),dini_Int(file,"Ammo 6"));
GivePlayerWeapon(playerid,dini_Int(file,"Weapon 7"),dini_Int(file,"Ammo 7"));
GivePlayerWeapon(playerid,dini_Int(file,"Weapon 8"),dini_Int(file,"Ammo 8"));
}
else
{
return 1;
}
SetPlayerToTeamColor(playerid);
if(gTeam[playerid] == TEAM_GROVE)
{
gTeam[playerid] = TEAM_GROVE;
ResetPlayerWeapons(playerid);
GameTextForPlayer(playerid,"You are Grove.",1,1);
}
if(gTeam[playerid] == TEAM_COPS)
{
gTeam[playerid] = TEAM_COPS;
ResetPlayerWeapons(playerid);
GameTextForPlayer(playerid,"You are a Cop.",1,1);
}
if(gTeam[playerid] == TEAM_OUTLAWS)
{
gTeam[playerid] = TEAM_OUTLAWS;
ResetPlayerWeapons(playerid);
GameTextForPlayer(playerid,"You are OutLaw!!",1,1);
}
if(gTeam[playerid] == TEAM_FBI)
{
gTeam[playerid] = TEAM_FBI;
ResetPlayerWeapons(playerid);
GameTextForPlayer(playerid,"You are FBI.",1,1);
}
if(gTeam[playerid] == TEAM_CRIPS)
{
gTeam[playerid] = TEAM_CRIPS;
ResetPlayerWeapons(playerid);
GameTextForPlayer(playerid,"You are Crip's.",1,1);
}
if(gTeam[playerid] == TEAM_SOLDIERS)
{
gTeam[playerid] = TEAM_SOLDIERS;
ResetPlayerWeapons(playerid);
GameTextForPlayer(playerid,"You are a Soldier.",1,1);
}
if(gTeam[playerid] == TEAM_BALLAS)
{
gTeam[playerid] = TEAM_BALLAS;
ResetPlayerWeapons(playerid);
GameTextForPlayer(playerid,"You are Ballas.",1,1);
}
/* if (PlayerInfo[playerid][VipLevel] == 0)
{
SendClientMessage(playerid, COLOR_LIGHTGREEN, " You are a Normal player , you don't have any privilages.");
}
else if (PlayerInfo[playerid][VipLevel] == 1)
{
GivePlayerWeapon(playerid , 22, 20);
GivePlayerMoney(playerid, 30);
SendClientMessage(playerid, COLOR_GREY, "You are (VIP:Silver) you earn $30 and a colt45 with 20 ammo.");
}
else if (PlayerInfo[playerid][VipLevel] == 2)
{
GivePlayerWeapon(playerid , 22, 50);
GivePlayerMoney(playerid, 100);
SendClientMessage(playerid, COLOR_YELLOW3, "You are (VIP:Gold) you earn $100 and a colt45 with 50 ammo.");
}
else if (PlayerInfo[playerid][VipLevel] == 3)
{
GivePlayerWeapon(playerid , 25, 50);
GivePlayerWeapon(playerid , 22, 50);
GivePlayerMoney(playerid,GetPlayerMoney(playerid)+250);
SendClientMessage(playerid, COLOR_GREY, "You are (VIP:Premium) you earn $250 and a colt45+shotgun with 50 ammo.");
} */
return 1;
}
it gives to me 4 errors :
Код:
C:\DOCUME~1\ADMINI~1\Bureau\ALAE\LATDM\GAMEMO~1\LATDM.pwn(455) : warning 217: loose indentation C:\DOCUME~1\ADMINI~1\Bureau\ALAE\LATDM\GAMEMO~1\LATDM.pwn(532) : error 017: undefined symbol "PlayerInfo" C:\DOCUME~1\ADMINI~1\Bureau\ALAE\LATDM\GAMEMO~1\LATDM.pwn(532) : warning 215: expression has no effect C:\DOCUME~1\ADMINI~1\Bureau\ALAE\LATDM\GAMEMO~1\LATDM.pwn(532) : error 001: expected token: ";", but found "]" C:\DOCUME~1\ADMINI~1\Bureau\ALAE\LATDM\GAMEMO~1\LATDM.pwn(532) : error 029: invalid expression, assumed zero C:\DOCUME~1\ADMINI~1\Bureau\ALAE\LATDM\GAMEMO~1\LATDM.pwn(532) : fatal error 107: too many error messages on one line Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 4 Errors.
pawn Код:
enum pData
{
Registered,
LoggedIn,
VipLevel,
Kills,
Deaths,
Wep1,
Ammo1,
Wep2,
Ammo2,
Wep3,
Ammo3,
Wep4,
Ammo4,
Wep5,
Ammo5,
Wep6,
Ammo6,
Wep7,
Ammo7,
Wep8,
Ammo8,
Gendre,
Age,
};