Bad error
#1

There is an error with this code:

(Line 549)if(strcmp(cmd, "/makeadmin", true) == 0)
{
if(IsPlayerConnected(playerid)) (Line552)

tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_RED, "USAGE: /makeadmin [playerid/PartOfName] [Admin Rank]");
SendClientMessage(playerid, COLOR_YELLOW, "(0) Remove Admin Status");
SendClientMessage(playerid, COLOR_YELLOW, "(1) Moderator");
SendClientMessage(playerid, COLOR_YELLOW, "(2) Junior Admin");
SendClientMessage(playerid, COLOR_YELLOW, "(3) General Admin");
SendClientMessage(playerid, COLOR_YELLOW, "(4) Senior Admin");
SendClientMessage(playerid, COLOR_YELLOW, "(1337) Head Admin");
SendClientMessage(playerid, COLOR_YELLOW, "(133 Co-Community Owner");
(Line 564)SendClientMessage(playerid, COLOR_YELLOW, "(1339) Co-Community Owner");
SendClientMessage(playerid, COLOR_YELLOW, "(99999) Community Owner");
return 1;
}
(Line 56new para1;
new level;
para1 = ReturnUser(tmp);
(Line 571)tmp = strtok(cmdtext, idx);
level = strval(tmp);
(Line 573)if(PlayerInfo[playerid][pAdmin] >= 99999 || strcmp(sendername, "Callum_Riley", true) == 0)
{
(Line 575)if(IsPlayerConnected(para1))
{
if(para1 != INVALID_PLAYER_ID)
{
GetPlayerName(para1, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
PlayerInfo[para1][pAdmin] = level;
printf("{AA3333}AdmCmd{FFFF00}: %s has promoted %s to a level %d admin.", sendername, giveplayer, level);
format(string, sizeof(string), " You have been promoted to a level %d admin by %s", level, sendername);
SendClientMessage(para1, COLOR_LIGHTBLUE, string);
format(string, sizeof(string), " You have promoted %s to a level %d admin.", giveplayer,level);
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
}
(Line 58 }
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, " you are not authorized to use that command!");
(Line 593) }
}
(Line 595)return 1;
}


This is the error message:

C:\Users\Gamer\Desktop\good\gamemodes\test.pwn(547 ) : error 010: invalid function or declaration
C:\Users\Gamer\Desktop\good\gamemodes\test.pwn(549 ) : error 010: invalid function or declaration
C:\Users\Gamer\Desktop\good\gamemodes\test.pwn(552 ) : error 010: invalid function or declaration
C:\Users\Gamer\Desktop\good\gamemodes\test.pwn(564 ) : error 010: invalid function or declaration
C:\Users\Gamer\Desktop\good\gamemodes\test.pwn(568 ) : error 010: invalid function or declaration
C:\Users\Gamer\Desktop\good\gamemodes\test.pwn(571 ) : error 010: invalid function or declaration
C:\Users\Gamer\Desktop\good\gamemodes\test.pwn(573 ) : error 010: invalid function or declaration
C:\Users\Gamer\Desktop\good\gamemodes\test.pwn(575 ) : error 010: invalid function or declaration
C:\Users\Gamer\Desktop\good\gamemodes\test.pwn(588 ) : error 010: invalid function or declaration
C:\Users\Gamer\Desktop\good\gamemodes\test.pwn(593 ) : error 010: invalid function or declaration
C:\Users\Gamer\Desktop\good\gamemodes\test.pwn(595 ) : warning 203: symbol is never used: "level"
C:\Users\Gamer\Desktop\good\gamemodes\test.pwn(595 ) : warning 203: symbol is never used: "para1"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


10 Errors.


Can someone please fix it!
Reply
#2

OMG. someone block this guy from posting for some days
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)