Posts: 128
Threads: 14
Joined: Mar 2014
Reputation:
0
I have this wierd thing when i try to make myself admin, It will just give the usage, And in the console there comes SSCanf not initialised, This is only with the /makeadmin command so far, I updates all plugins, Searched the forum for answers but nothing worked,
Thanks
Posts: 775
Threads: 78
Joined: Dec 2014
Give code of makeadmin
Else we cant help
Posts: 128
Threads: 14
Joined: Mar 2014
Reputation:
0
Errors:
C:\Users\-\Desktop\LVRP\gamemodes\LVRPNEW.pwn(459) : error 017: undefined symbol "AdminDuty"
C:\Users\-\Desktop\LVRP\gamemodes\LVRPNEW.pwn(459) : warning 215: expression has no effect
C:\Users\-\Desktop\LVRP\gamemodes\LVRPNEW.pwn(459) : error 001: expected token: ";", but found "]"
C:\Users\-\Desktop\LVRP\gamemodes\LVRPNEW.pwn(459) : error 029: invalid expression, assumed zero
C:\Users\-\Desktop\LVRP\gamemodes\LVRPNEW.pwn(459) : fatal error 107: too many error messages on one line
EDIT:
Makeadmin code:
CMD:makeadmin(playerid, params[])
{
new pID, value;
if(PlayerInfo[playerid][pAdmin] < 5 && !IsPlayerAdmin(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You're not authorized to use that command");
else if (sscanf(params, "ui", pID, value)) return SendClientMessage(playerid, -1,"USAGE: /makeadmin [playerid/PartOfName] [level 1-5]");
else if (value < 0 || value > 5) return SendClientMessage(playerid, COLOR_GRAD2, "Invalid level specified !(1-5)");
else if(pID == INVALID_PLAYER_ID) return SendClientMessage(playerid, COLOR_GRAD2,"Invalid player specified !");
else
{
new tName[MAX_PLAYER_NAME], string[128];
GetPlayerName(pID, tName, MAX_PLAYER_NAME);
strreplace(tName, '_', ' ');
format(string, sizeof(string), "* You've promoted %s to an level %d Administrator.", tName, value);
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
format(string, sizeof(string), "* You've been promoted to an level %d Administrator by %s.", value, GetName(playerid));
SendClientMessage(pID, COLOR_LIGHTBLUE, string);
printf("AdmCmd: %s has promoted %s to a level %d admin.", GetName(playerid), tName, value);
PlayerInfo[pID][pAdmin] = value;
}
return 1;
}
Posts: 775
Threads: 78
Joined: Dec 2014
I gonna se if i can fix this.
Im at my computer now.