New 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)
+--- Thread: New Errors! (
/showthread.php?tid=435702)
New Errors! -
pln102 - 08.05.2013
Please help me with these errors
Код:
C:\Users\Ben\Desktop\FP-RP\gamemodes\FPRP.pwn(37943) : error 029: invalid expression, assumed zero
C:\Users\Ben\Desktop\FP-RP\gamemodes\FPRP.pwn(37943) : warning 215: expression has no effect
C:\Users\Ben\Desktop\FP-RP\gamemodes\FPRP.pwn(37943) : error 001: expected token: ";", but found "]"
C:\Users\Ben\Desktop\FP-RP\gamemodes\FPRP.pwn(37943) : error 029: invalid expression, assumed zero
C:\Users\Ben\Desktop\FP-RP\gamemodes\FPRP.pwn(37943) : fatal error 107: too many error messages on one line
Re: New Errors! -
Yashas - 08.05.2013
PlayerInfo[playerid][pAdminTitle]
Is pAdminTitle there in your enum??
And after declaring a enum did you new PlayerInfo[MAX_PLAYERS][ENUM]; ??
Re: New Errors! -
pln102 - 08.05.2013
I meant by this code, not the other code. Take a closer look at it
Код:
CMD:aduty(playerid)
{
if(PlayerInfo[playerid][pAdmin] >= 1)
{
new string[128];
if(AdminDuty[playerid] == 0)
{
format(string, sizeof(string), "<%s> %s %s is now on duty.",PlayerInfo[playerid][pAdmin], [pAdminTitle], PlayerName(playerid));
BroadCast(COLOR_YELLOW,string);
AdminDuty[playerid] = 1;
SetPlayerColor(playerid, COLOR_BRIGHTRED);
if(PlayerInfo[playerid][pSex] == 1)
{
SetPlayerSkin(playerid, 217);
}
else
{
SetPlayerSkin(playerid, 211);
}
return 1;
}
else
{
format(string, sizeof(string), "<%s> %s %s is now off duty.",PlayerInfo[playerid][pAdmin], [pAdminTitle], PlayerName(playerid));
BroadCast(COLOR_YELLOW,string);
AdminDuty[playerid] = 0;
DestroyDynamic3DTextLabel(AdminLabel[playerid]);
SetPlayerSkin(playerid, PlayerInfo[playerid][pModel]);
if(PlayerInfo[playerid][pDonateRank] == 1 || PlayerInfo[playerid][pDonateRank] == 2 || PlayerInfo[playerid][pDonateRank] == 3)
{
SetPlayerColor(playerid, COLOR_YELLOW);
}
else if(PlayerInfo[playerid][pDonateRank] >= 4)
{
SetPlayerColor(playerid, COLOR_PINK);
}
else if(PlayerInfo[playerid][pConnectTime] < 50)
{
SetPlayerColor(playerid, COLOR_LIGHTGREEN);
}
else
{
SetPlayerColor(playerid, COLOR_WHITE);
}
return 1;
}
}
return 1;
}
Error is in the red light
please help me fix it and thanks
Re: New Errors! -
radiobizza - 08.05.2013
Try to change the red line in this
PHP код:
new playername[MAX_PLAYERS_NAME];
format(string, sizeof(string), "<%s> %s %s is now on duty.",PlayerInfo[playerid][pAdmin], PlayerInfo[playerid][pAdminTitle], playername(playerid));
Re: New Errors! -
pln102 - 08.05.2013
Still no good same errors
Re: New Errors! -
pln102 - 08.05.2013
Can somebody help me?