tag mismatch error
#1

Код:
//--------------------------------//
CMD:makeadmin(playerid,params[])
{
    if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid,-4,"Only server owner(s) are authorized to use this command.");//Checking if the player is rcon admin to set an admin level
    new id, level;//Creating the id variable to store the selected id and a level variable for the chosen admin level.
    if(sscanf(params,"ui",id,level)) return SendClientMessage(playerid,-1,"USAGE: /setadmin <id> <level>");//Check if the player inputted a username or id and a admin level.
    if(!IsPlayerConnected(id)) return SendClientMessage(playerid,-4,"That player is not connected!");//Checking if the selected user is connected or not.
    new file[64],PlayerName[24];//Creating a variable to store the file path, and a variable to store the players name.
    GetPlayerName(id,PlayerName,sizeof PlayerName);//Retrieving the selected id's name,
    format(file,sizeof file,"Admin/%s.ini",PlayerName);
    if(!fexist(file)) return SendClientMessage(playerid,-4,"That player is not registered");//Checking if the player is not registered
    INI_Open(file);//Opening the file with SII include
    INI_WriteInt("pAdmin", pAdmin);//Writing the line "Level" the selected admin level.
    INI_Save();//Saving the file
    INI_Close();//Closing the file
    PInfo[id][pAdmin] = pAdmin;
    SendClientMessage(playerid,-1,"You have made %s administrator.");
    GetPlayerName(id,PlayerName,sizeof PlayerName);
    SendClientMessage(id,-1,"You have been promoted to server administrator, read through /ahelp for all the admin commands.");
    return 1;
}
//--------------------------------//
I'm getting the following errors when I compile it.

Код:
C:\Users\Ole2\Desktop\SA-MP\The Ghetto of Los Santos\gamemodes\TGOLS.pwn(240) : warning 213: tag mismatch
C:\Users\Ole2\Desktop\SA-MP\The Ghetto of Los Santos\gamemodes\TGOLS.pwn(243) : warning 213: tag mismatch
Reply
#2

Which are the lines 240 and 243?
Reply
#3

Quote:
Originally Posted by rakshith122
Посмотреть сообщение
Which are the lines 240 and 243?
Line 240:
Код:
INI_WriteInt("pAdmin", pAdmin);
Line 243:
Код:
PInfo[id][pAdmin] = pAdmin;
Reply
#4

Try this :
LINE 240
pawn Код:
INI_WriteInt("pAdmin",level);
LINE 243
pawn Код:
pInfo[id][pAdmin] = level;
Reply
#5

Thank you, it works.

+rep
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)