29.12.2011, 14:21
Hey. I'm creating my admin system, using ZCMD, and sscanf..
And, when trying to make the first command, I get this.
This is the command:
When trying to launch the server, I get:
Even though it compiles fine..
I've updated sscanf to 0.3d
BUT, if I do like this:
Like you can see, I've commented out the sscanf line.
now, the server starts, but ofcourse the command doesn't work.
Any help would be greatly appreciated.
And, when trying to make the first command, I get this.
This is the command:
pawn Код:
CMD:makeadmin(playerid, params[])
{
if(IsPlayerAdmin(playerid) == 1 || PlayerInfo[playerid][pAdmin] < 1338 || PlayerInfo[playerid][pCSA] == 1)
{
new id, name[24], str[128], level;
GetPlayerName(id, name, 24);
if(sscanf(params, "ui", id, level)) return SendClientMessage(playerid, COLOR_SYSTEM, "USAGE: /makeadmin <ID> <level>");
PlayerInfo[id][pAdmin] = level;
format(str, sizeof(str), "%s has been made a level %s.", name, level);
}else
{
SendClientMessage(playerid, COLOR_SYSTEM, "You're not high enough admin-level or not an admin at all!");
}
return 1;
}
pawn Код:
Script[gamemodes/MyScript.amx]: Run time error 19: "File or function is not found"
I've updated sscanf to 0.3d
BUT, if I do like this:
pawn Код:
CMD:makeadmin(playerid, params[])
{
if(IsPlayerAdmin(playerid) == 1 || PlayerInfo[playerid][pAdmin] < 1338 || PlayerInfo[playerid][pCSA] == 1)
{
new id, name[24], str[128], level;
GetPlayerName(id, name, 24);
//if(sscanf(params, "ui", id, level)) return SendClientMessage(playerid, COLOR_SYSTEM, "USAGE: /makeadmin <ID> <level>");
PlayerInfo[id][pAdmin] = level;
format(str, sizeof(str), "%s has been made a level %s.", name, level);
}else
{
SendClientMessage(playerid, COLOR_SYSTEM, "You're not high enough admin-level or not an admin at all!");
}
return 1;
}
now, the server starts, but ofcourse the command doesn't work.
Any help would be greatly appreciated.