Y_INI & INI_String Errors
#1

Errors:

PHP код:
Compiling...
C:\Users\Yassine\Desktop\gm.pwn(643) : error 017undefined symbol "name"
C:\Users\Yassine\Desktop\gm.pwn(643) : error 017undefined symbol "value"
Pawn compiler 3.2.3664              Copyright (c1997-2006ITB CompuPhase
2 Errors

Codes:

PHP код:
stock YINI_CheckBan(playerid)
{
    new 
pIP[16], BannedIP[16], string[35], banned;
    
GetPlayerIp(playeridpIPsizeof(pIP));
    
format(string,sizeof(string),"/Banned/%s.ini",GetName(playerid));
    if(
fexist(string))
    {
        new 
INI:File INI_Open(string);
        
INI_String("IP"BannedIP); 
        
INI_Close(File);
        if(!
strcmp(BannedIPpIP)) return banned 1;
        else 
        return 
banned 0;
    }
    return 
banned;

any ideas ?
Reply
#2

You sure these are the correct lines? Is it 'gm.pwn' file?
Reply
#3

Yes

PHP код:
INI_String("IP"BannedIP); 
the error line
Reply
#4

You should WriteInt instead i think
Reply
#5

I don't think that's the line comment it and compile again.
Reply
#6

Quote:
Originally Posted by Hunud
Посмотреть сообщение
You should WriteInt instead i think
WriteInt ==> Write Integer

i need to write string not int

EDIT:

Quote:
Originally Posted by Sreyas
Посмотреть сообщение
I don't think that's the line comment it and compile again.
it's complie fine if i comment the line

but i need it so i can't comment it
Reply
#7

Quote:
Originally Posted by Yaa
Посмотреть сообщение
WriteInt ==> Write Integer

i need to write string not int

EDIT:




it's complie fine if i comment the line

but i need it so i can't comment it
I don't meant to remove it I was telling you to do a trial method so as to confirm its from that line.
Reply
#8

Quote:
Originally Posted by Sreyas
Посмотреть сообщение
I don't meant to remove it I was telling you to do a trial method so as to confirm its from that line.
i know. i comment it and the problem from this line exacly
Reply
#9

That function has one more parameter try passing length too

sizeof(BannedIP)
Reply
#10

Quote:
Originally Posted by Sreyas
Посмотреть сообщение
That function has one more parameter try passing length too

sizeof(BannedIP)
same

PHP код:
Compiling... 
C:\Users\Yassine\Desktop\gm.pwn(643) : error 017undefined symbol "name" 
C:\Users\Yassine\Desktop\gm.pwn(643) : error 017undefined symbol "value" 
Pawn compiler 3.2.3664              Copyright (c1997-2006ITB CompuPhase 
2 Errors

Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)