22.02.2010, 21:45
This is my SetLevel command i have coded using SSCANF, But i am getting errors on the Level setting.
These are the errors:
Dose anyone know what would make these errors occur?, Thanks.
Код:
dcmd_setlevel(playerid,params[]) { if (PlayerInfo[playerid][Level] > 1) { new LevelUpAnnouncement[128], AdministratorName[MAX_PLAYER_NAME], LevelPlayer[MAX_PLAYER_NAME], PlayerFile[128], id; if (sscanf(params, "ud", id, Level)) SendClientMessage(playerid, 0xFF0000AA, "Usage: /setlevel [playerid/partname] [level]"); else if (id == INVALID_PLAYER_ID) SendClientMessage(playerid, 0xFF0000AA, "Player not found"); else { if(PlayerInfo[id][LoggedIn] == 1) { GetPlayerName(id, LevelPlayer, sizeof(LevelPlayer)); GetPlayerName(playerid, AdministratorName, sizeof(AdministratorName)); format(LevelUpAnnouncement, sizeof(LevelUpAnnouncement),"Administrator %s made %s a Administrator [Level: %d]",AdministratorName, LevelPlayer, Level); SendClientMessageToAll(AdministrationAnnouncement, LevelUpAnnouncement); PlayerInfo[id][Level] = Level; format(PlayerFile, sizeof(PlayerFile), "Users/%s.max", LevelPlayer); dini_IntSet(PlayerFile, "AdminLevel", Level); PlayerPlaySound(id, 1057, 0.0, 0.0, 0.0); } else { SendClientMessage(playerid, AdministrationError, "Error: The player must be logged in to use this command!"); } } } else { SendClientMessage(playerid, AdministrationError, NotAdminError); } }
Код:
C:\Users\Christopher\Desktop\AdminMax.pwn(810) : warning 213: tag mismatch C:\Users\Christopher\Desktop\AdminMax.pwn(821) : warning 213: tag mismatch C:\Users\Christopher\Desktop\AdminMax.pwn(825) : warning 213: tag mismatch C:\Users\Christopher\Desktop\AdminMax.pwn(829) : warning 213: tag mismatch
Код:
Line 810: if (sscanf(params, "ud", id, Level)) SendClientMessage(playerid, 0xFF0000AA, "Usage: /setlevel [playerid/partname] [level]") Line 821: format(LevelUpAnnouncement, sizeof(LevelUpAnnouncement),"Administrator %s made %s a Administrator [Level: %d]",AdministratorName, LevelPlayer, Level); Line 825: PlayerInfo[id][Level] = Level; Line 829: dini_IntSet(PlayerFile, "AdminLevel", Level);