E:\UCNR updated (Sultan)\pawno\include\cnr/cnr_admincommands.inc(67) : warning 225: unreachable code
E:\UCNR updated (Sultan)\pawno\include\cnr/cnr_admincommands.inc(294) : error 029: invalid expression, assumed zero
E:\UCNR updated (Sultan)\pawno\include\cnr/cnr_admincommands.inc(371) : error 029: invalid expression, assumed zero
E:\UCNR updated (Sultan)\pawno\include\cnr/cnr_admincommands.inc(416) : error 029: invalid expression, assumed zero
E:\UCNR updated (Sultan)\pawno\include\cnr/cnr_admincommands.inc(443) : error 029: invalid expression, assumed zero
E:\UCNR updated (Sultan)\pawno\include\cnr/cnr_admincommands.inc(480) : error 029: invalid expression, assumed zero
E:\UCNR updated (Sultan)\pawno\include\cnr/cnr_admincommands.inc(508) : error 029: invalid expression, assumed zero
E:\UCNR updated (Sultan)\pawno\include\cnr/cnr_admincommands.inc(613) : error 029: invalid expression, assumed zero
E:\UCNR updated (Sultan)\pawno\include\cnr/cnr_admincommands.inc(685) : error 029: invalid expression, assumed zero
E:\UCNR updated (Sultan)\pawno\include\cnr/cnr_admincommands.inc(721) : error 029: invalid expression, assumed zero
E:\UCNR updated (Sultan)\pawno\include\cnr/cnr_admincommands.inc(765) : error 029: invalid expression, assumed zero
E:\UCNR updated (Sultan)\pawno\include\cnr/cnr_admincommands.inc(1000) : error 029: invalid expression, assumed zero
E:\UCNR updated (Sultan)\pawno\include\cnr/cnr_admincommands.inc(1038) : error 029: invalid expression, assumed zero
E:\UCNR updated (Sultan)\pawno\include\cnr/cnr_admincommands.inc(2936) : warning 225: unreachable code
E:\UCNR updated (Sultan)\pawno\include\cnr/cnr_admincommands.inc(2959) : error 029: invalid expression, assumed zero
E:\UCNR updated (Sultan)\pawno\include\cnr/cnr_admincommands.inc(6964) : warning 225: unreachable code
E:\UCNR updated (Sultan)\gamemodes\CnR1.pwn(3619) : warning 219: local variable "playerFPS" shadows a variable at a preceding level
E:\UCNR updated (Sultan)\gamemodes\CnR1.pwn(3620) : warning 219: local variable "playerDrunkLevel" shadows a variable at a preceding level
E:\UCNR updated (Sultan)\gamemodes\CnR1.pwn(4157) : warning 203: symbol is never used: "playerDrunkLevel"
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
13 Errors.
if ( playerData[playerid][playerLevel] < Level_Here )
return SendClientMessage(playerid, COLOR_WHITE, "{F81414}[ERROR]{FFFFFF} You don't have an appropriate administration level to use this command." );
Defining color I guess? Have I used it wrong here?
Assist me friend - Do I have to add -1 instead of COLOR_WHITE? |
E:\UCNR updated (Sultan)\pawno\include\cnr/cnr_admincommands.inc(67) : warning 225: unreachable code
E:\UCNR updated (Sultan)\pawno\include\cnr/cnr_admincommands.inc(294) : error 029: invalid expression, assumed zero
E:\UCNR updated (Sultan)\pawno\include\cnr/cnr_admincommands.inc(371) : error 029: invalid expression, assumed zero
E:\UCNR updated (Sultan)\pawno\include\cnr/cnr_admincommands.inc(416) : error 029: invalid expression, assumed zero
E:\UCNR updated (Sultan)\pawno\include\cnr/cnr_admincommands.inc(443) : error 029: invalid expression, assumed zero
E:\UCNR updated (Sultan)\pawno\include\cnr/cnr_admincommands.inc(480) : error 029: invalid expression, assumed zero
E:\UCNR updated (Sultan)\pawno\include\cnr/cnr_admincommands.inc(508) : error 029: invalid expression, assumed zero
E:\UCNR updated (Sultan)\pawno\include\cnr/cnr_admincommands.inc(613) : error 029: invalid expression, assumed zero
E:\UCNR updated (Sultan)\pawno\include\cnr/cnr_admincommands.inc(685) : error 029: invalid expression, assumed zero
E:\UCNR updated (Sultan)\pawno\include\cnr/cnr_admincommands.inc(721) : error 029: invalid expression, assumed zero
E:\UCNR updated (Sultan)\pawno\include\cnr/cnr_admincommands.inc(765) : error 029: invalid expression, assumed zero
E:\UCNR updated (Sultan)\pawno\include\cnr/cnr_admincommands.inc(1000) : error 029: invalid expression, assumed zero
E:\UCNR updated (Sultan)\pawno\include\cnr/cnr_admincommands.inc(1038) : error 029: invalid expression, assumed zero
E:\UCNR updated (Sultan)\pawno\include\cnr/cnr_admincommands.inc(2936) : warning 225: unreachable code
E:\UCNR updated (Sultan)\pawno\include\cnr/cnr_admincommands.inc(2959) : error 029: invalid expression, assumed zero
E:\UCNR updated (Sultan)\pawno\include\cnr/cnr_admincommands.inc(5786) : error 017: undefined symbol "i"
E:\UCNR updated (Sultan)\pawno\include\cnr/cnr_admincommands.inc(6964) : warning 225: unreachable code
E:\UCNR updated (Sultan)\gamemodes\CnR1.pwn(3619) : warning 219: local variable "playerFPS" shadows a variable at a preceding level
E:\UCNR updated (Sultan)\gamemodes\CnR1.pwn(3620) : warning 219: local variable "playerDrunkLevel" shadows a variable at a preceding level
E:\UCNR updated (Sultan)\gamemodes\CnR1.pwn(4157) : warning 203: symbol is never used: "playerDrunkLevel"
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
14 Errors.
COMMAND:playertokens(playerid, params[])
{
if(playerData[playerid][playerLoggedIn])
{
if ( playerData[playerid][playerLevel] < 6 )
return SendClientMessage(playerid, -1, "{F81414}[ERROR]{FFFFFF} You don't have an appropriate administration level to use this command." );
{
new
otherID,
message[128]
;
if(sscanf(params, "u", otherID))
{
SendClientMessage(playerid, COLOR_WHITE, "{B7B7B7}[SERVER] {FFFFFF}Usage: \"playertokens <playerid>\"");
}
else
{
if(IsPlayerConnected(otherID))
{
if(playerData[otherID][playerLoggedIn])
{
format(message, sizeof(message), "{B7B7B7}[INFO] {FFFFFF}%s(%i) has {FFDC2E}%i {FFFFFF}tokens.", playerData[otherID][playerNamee], otherID, playerData[otherID][rTokens]);
SendClientMessage(playerid, COLOR_WHITE, message);
}
else
{
SendClientMessage(playerid, COLOR_WHITE, "{B7B7B7}[SERVER] {FFFFFF}That player is not logged in!");
}
}
else
{
SendClientMessage(playerid, COLOR_WHITE, "{B7B7B7}[SERVER] {FFFFFF}That player is not online!");
}
}
}
else // line 294
{
return 0;
}
}
return 1;
}
COMMAND:playerjob(playerid, params[])
{
if(playerData[playerid][playerLoggedIn])
{
if ( playerData[playerid][playerLevel] < 3 )
return SendClientMessage(playerid, -1, "{F81414}[ERROR]{FFFFFF} You don't have an appropriate administration level to use this command." );
{
new
otherID
;
if(sscanf(params, "u", otherID))
{
SendClientMessage(playerid, COLOR_WHITE, "{B7B7B7}[SERVER] {FFFFFF}Usage: \"playerjob <playerid>\"");
}
else
{
if(IsPlayerConnected(otherID))
{
if(playerData[otherID][playerLoggedIn])
{
switch(playerData[otherID][playerJob])
{
case JOB_KIDNAPPER:
{
SendClientMessage(playerid, COLOR_WHITE, "{B7B7B7}[PLAYER JOB] {FFFFFF}That player is a kidnapper.");
}
case JOB_MECHANIC:
{
SendClientMessage(playerid, COLOR_WHITE, "{B7B7B7}[PLAYER JOB] {FFFFFF}That player is a mechanic.");
}
case JOB_WEAPONDEALER:
{
SendClientMessage(playerid, COLOR_WHITE, "{B7B7B7}[PLAYER JOB] {FFFFFF}That player is a weapon dealer.");
}
case JOB_HITMAN:
{
SendClientMessage(playerid, COLOR_WHITE, "{B7B7B7}[PLAYER JOB] {FFFFFF}That player is a hitman.");
}
case JOB_RAPIST:
{
SendClientMessage(playerid, COLOR_WHITE, "{B7B7B7}[PLAYER JOB] {FFFFFF}That player is a rapist.");
}
case JOB_DRUGDEALER:
{
SendClientMessage(playerid, COLOR_WHITE, "{B7B7B7}[PLAYER JOB] {FFFFFF}That player is a drug dealer.");
}
case JOB_TERRORIST:
{
SendClientMessage(playerid, COLOR_WHITE, "{B7B7B7}[PLAYER JOB] {FFFFFF}That player is a terrorist.");
}
default:
{
SendClientMessage(playerid, COLOR_WHITE, "{B7B7B7}[PLAYER JOB] {FFFFFF}That player has no job.");
}
}
}
else
{
SendClientMessage(playerid, COLOR_WHITE, "{B7B7B7}[SERVER] {FFFFFF}That player is not logged in!");
}
}
else
{
SendClientMessage(playerid, COLOR_WHITE, "{B7B7B7}[SERVER] {FFFFFF}That player is not online!");
}
}
}
else // error 371 line
{
return 0;
}
}
return 1;
}
COMMAND:playerjailtime(playerid, params[])
{
if(playerData[playerid][playerLoggedIn])
{
if ( playerData[playerid][playerLevel] < 1 )
return SendClientMessage(playerid, -1, "{F81414}[ERROR]{FFFFFF} You don't have an appropriate administration level to use this command." );
{
new
otherID,
message[128]
;
if(sscanf(params, "u", otherID))
{
SendClientMessage(playerid, COLOR_WHITE, "{B7B7B7}[SERVER] {FFFFFF}Usage: \"playerjailtime <playerid>\"");
}
else
{
if(IsPlayerConnected(otherID))
{
if(playerData[otherID][playerLoggedIn])
{
format (message, sizeof(message), "{B7B7B7}[JAIL TIME] {FFFFFF}That player has %i seconds remaining in jail.", playerData[otherID][playerJailTime]);
SendClientMessage(playerid, COLOR_WHITE, message);
}
else
{
SendClientMessage(playerid, COLOR_WHITE, "{B7B7B7}[SERVER] {FFFFFF}That player is not logged in!");
}
}
else
{
SendClientMessage(playerid, COLOR_WHITE, "{B7B7B7}[SERVER] {FFFFFF}That player is not online!");
}
}
}
else // error = line 416
{
return 0;
}
}
return 1;
}
COMMAND:alog(playerid, params[])
{
if ( playerData[playerid][playerLevel] < 2 )
return SendClientMessage(playerid, -1, "{F81414}[ERROR]{FFFFFF} You don't have an appropriate administration level to use this command." );
{
if(playerData[playerid][showALog])
{
TextDrawHideForPlayer(playerid, alog1);
TextDrawHideForPlayer(playerid, alog2);
TextDrawHideForPlayer(playerid, alog3);
TextDrawHideForPlayer(playerid, alog4);
TextDrawHideForPlayer(playerid, alog5);
playerData[playerid][showALog] = false;
SendClientMessage(playerid, COLOR_WHITE, "{FF0770}[ADMIN] {FFFFFF}You have un-toggled the administration log.");
}
else
{
TextDrawShowForPlayer(playerid, alog1);
TextDrawShowForPlayer(playerid, alog2);
TextDrawShowForPlayer(playerid, alog3);
TextDrawShowForPlayer(playerid, alog4);
TextDrawShowForPlayer(playerid, alog5);
SendClientMessage(playerid, COLOR_WHITE, "{FF0770}[ADMIN] {FFFFFF}You have toggled the administration log.");
playerData[playerid][showALog] = true;
}
return 1;
}
return 0; // error = line 2936
}
COMMAND:alog(playerid, params[]) { if ( playerData[playerid][playerLevel] < 2 ) return 0; if(playerData[playerid][showALog]) { TextDrawHideForPlayer(playerid, alog1); TextDrawHideForPlayer(playerid, alog2); TextDrawHideForPlayer(playerid, alog3); TextDrawHideForPlayer(playerid, alog4); TextDrawHideForPlayer(playerid, alog5); playerData[playerid][showALog] = false; return SendClientMessage(playerid, 0xFF0770FF, "[ADMIN] {FFFFFF}You have un-toggled the administration log."); } else { TextDrawShowForPlayer(playerid, alog1); TextDrawShowForPlayer(playerid, alog2); TextDrawShowForPlayer(playerid, alog3); TextDrawShowForPlayer(playerid, alog4); TextDrawShowForPlayer(playerid, alog5); SendClientMessage(playerid, 0xFF0770FF, "[ADMIN] {FFFFFF}You have toggled the administration log."); return playerData[playerid][showALog] = true; } return 1; }
Code:
COMMAND:alog(playerid, params[]) { if ( playerData[playerid][playerLevel] < 2 ) return 0; if(playerData[playerid][showALog]) { TextDrawHideForPlayer(playerid, alog1); TextDrawHideForPlayer(playerid, alog2); TextDrawHideForPlayer(playerid, alog3); TextDrawHideForPlayer(playerid, alog4); TextDrawHideForPlayer(playerid, alog5); playerData[playerid][showALog] = false; return SendClientMessage(playerid, 0xFF0770FF, "[ADMIN] {FFFFFF}You have un-toggled the administration log."); } else { TextDrawShowForPlayer(playerid, alog1); TextDrawShowForPlayer(playerid, alog2); TextDrawShowForPlayer(playerid, alog3); TextDrawShowForPlayer(playerid, alog4); TextDrawShowForPlayer(playerid, alog5); SendClientMessage(playerid, 0xFF0770FF, "[ADMIN] {FFFFFF}You have toggled the administration log."); return playerData[playerid][showALog] = true; } return 1; } |
You have code after "if" AND then braces. The braces should be attached directly to the if.
|
if(playerData[playerid][playerLevel] < Level_Here )
if ( playerData[playerid][playerLevel] < Level_Here )
if(playerData[playerid][playerLevel] < 5) // 5 being an admin level
Code:
if(playerData[playerid][playerLevel] < 5) // 5 being an admin level |
if(playerData[playerid][playerLevel] < 5) return SendClientMessage(playerid, -1, "Your player level is not high enough");
Code:
if(playerData[playerid][playerLevel] < 5) return SendClientMessage(playerid, -1, "Your player level is not high enough"); |
Do you mean
pawn Code:
pawn Code:
|
if ( playerData[playerid][playerLevel] < 6 )
return SendClientMessage(playerid, -1, "{F81414}[ERROR]{FFFFFF} You don't have an appropriate administration level to use this command." );
{
if ( playerData[playerid][playerLevel] < 6 )
{
return SendClientMessage(playerid, -1, "{F81414}[ERROR]{FFFFFF} You don't have an appropriate administration level to use this command." );
}
if ( playerData[playerid][playerLevel] < 6 ) return SendClientMessage(playerid, -1, "{F81414}[ERROR]{FFFFFF} You don't have an appropriate administration level to use this command." );
COMMAND:playertokens(playerid, params[])
{
if(!playerData[playerid][playerLoggedIn]) return 1; //assume this could be removed since player would not have playerLevel if not logged in?
if(playerData[playerid][playerLevel] < 6) return SendClientMessage(playerid, -1, "{F81414}[ERROR]{FFFFFF} You don't have an appropriate administration level to use this command." );
new otherID;
if(!sscanf(params, "u", otherID)) return SendClientMessage(playerid, COLOR_WHITE, "{B7B7B7}[SERVER] {FFFFFF}Usage: \"playertokens <playerid>\"");
if(!IsPlayerConnected(otherID)) return SendClientMessage(playerid, COLOR_WHITE, "{B7B7B7}[SERVER] {FFFFFF}That player is not online!");
if(!playerData[otherID][playerLoggedIn]) return SendClientMessage(playerid, COLOR_WHITE, "{B7B7B7}[SERVER] {FFFFFF}That player is not logged in!");
new message[128];
format(message, sizeof(message), "{B7B7B7}[INFO] {FFFFFF}%s(%i) has {FFDC2E}%i {FFFFFF}tokens.", playerData[otherID][playerNamee], otherID, playerData[otherID][rTokens]);
SendClientMessage(playerid, COLOR_WHITE, message);
return 1;
}
if(playerData[playerid][playerLevel] != 5)
return SendClientMessage(playerid, -1, "{F81414}[ERROR]{FFFFFF} You don't have an appropriate administration level to use this command." );