Errors
#1

Greedings,its again me and i need again help...
I have got some errors in command unban please help me..
There is a code.
//errors
PHP код:
C:\Users\ichna\Desktop\SAMP server\pawno\RaIZone.pwn(781) : error 033: array must be indexed (variable "UnbanName")
C:\Users\ichna\Desktop\SAMP server\pawno\RaIZone.pwn(785) : error 033: array must be indexed (variable "UnbanName"
//command//and lines
PHP код:
CMD:unban(playerid,params[])
{
    new 
UnbanName[MAX_PLAYER_NAME],dovod[128],string[64],cesta[16+15],kesta[16+15];
    if(
AdminLevel[playerid] < 3)return SendClientMessage(playerid,COLOR_RED,"[!] {FFFFFF}Nemбљ oprбvnenie na tento prнkaz");
    if(
sscanf(params,"us[128]",UnbanName,dovod))return SendClientMessage(playerid,COLOR_RED,"[!] {FFFFFF}Musнљ zadať /unban [MenoHrбča] [Dфvod]");
    
format(cesta,sizeof(cesta),"Banneds/%s.ini",PlayerIP(playerid));
    
format(kesta,sizeof(kesta),"PermaBanneds/%s.ini",PlayerIP(playerid));
    
//this line// if(UnbanName == DOF2_GetString(cesta,"MenoHraca"))
    
{
          
DOF2_RemoveFile(cesta);
    }
        
//this line// else if(UnbanName == DOF2_GetString(kesta,"MenoHraca"))
    
{
          
DOF2_RemoveFile(kesta);
    }
    return 
1;
}
Thank you for helping me
Reply
#2

You can't compare 2 strings with operators. You have to use strcmp which mean string comparation. Check on the wiki what is the syntaxe
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)