SA-MP Forums Archive
Y_INI & INI_String Errors - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Y_INI & INI_String Errors (/showthread.php?tid=627143)



Y_INI & INI_String Errors - Yaa - 24.01.2017

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 ?


Re: Y_INI & INI_String Errors - oMa37 - 24.01.2017

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


Re: Y_INI & INI_String Errors - Yaa - 24.01.2017

Yes

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


Re: Y_INI & INI_String Errors - Hunud - 24.01.2017

You should WriteInt instead i think


Re: Y_INI & INI_String Errors - SyS - 24.01.2017

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


Re: Y_INI & INI_String Errors - Yaa - 24.01.2017

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


Re: Y_INI & INI_String Errors - SyS - 24.01.2017

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.


Re: Y_INI & INI_String Errors - Yaa - 24.01.2017

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


Re: Y_INI & INI_String Errors - SyS - 24.01.2017

That function has one more parameter try passing length too

sizeof(BannedIP)


Re: Y_INI & INI_String Errors - Yaa - 24.01.2017

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