SA-MP Forums Archive
How can I fix it - 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: How can I fix it (/showthread.php?tid=562103)



How can I fix it - EmpireSk - 06.02.2015

Good evening, how should I put these lines in y_ini ............. ?
I can work a little with y_ini however, this is difficult for me
How can I fix it...?

PHP код:
  new pIP[50]; GetPlayerIp(playerid,pIP,50);
         new 
string2[256];
       if(
strlen(dini_Get("ZeroAdmin/aka.txt"pIP)) == 0)
    
dini_Set("ZeroAdmin/aka.txt"pIPPlayerName);
     else
    {
        if( 
strfinddini_Get("ZeroAdmin/aka.txt"pIP), PlayerNametrue) == -)
        {
          
format(string2,sizeof(string2),"%s,%s"dini_Get("ZeroAdmin/aka.txt",pIP), PlayerName);
           
dini_Set("ZeroAdmin/aka.txt"pIPstring2);
        }
     } 



Re: How can I fix it - Threshold - 07.02.2015

If you want to put this into y_ini, convert it to y_ini first...


Re: How can I fix it - EmpireSk - 07.02.2015

I do not understand that what you wrote...


Re: How can I fix it - EmpireSk - 07.02.2015

Quote:
Originally Posted by Threshold
Посмотреть сообщение
If you want to put this into y_ini, convert it to y_ini first...
I am understood
But I do not know y_ini


Re: How can I fix it - Sawalha - 07.02.2015

try this
pawn Код:
new pIP[50]; GetPlayerIp(playerid,pIP,50);
         new string2[256];
       if(strlen(INI_String("ZeroAdmin/aka.txt", pIP)) == 0)
    INI_WriteString("ZeroAdmin/aka.txt", pIP, PlayerName);
     else
    {
        if( strfind(INI_String("ZeroAdmin/aka.txt", pIP), PlayerName, true) == -1 )
        {
          format(string2,sizeof(string2),"%s,%s", INI_String("ZeroAdmin/aka.txt",pIP), PlayerName);
           INI_WriteString("ZeroAdmin/aka.txt", pIP, string2);
        }
     }
some converting functions from dini - y_ini:
Код:
dini to y_ini:
dini_Get -> INI_String
dini_Int -> INI_Int
dini_IntSet -> INI_WriteInt
dini_Set -> INI_WriteString



Re: How can I fix it - EmpireSk - 07.02.2015

Error:
PHP код:
C:\Users\Mivco\Desktop\GameMode.pwn(206) : error 017undefined symbol "INI_String"
C:\Users\Mivco\Desktop\GameMode.pwn(207) : error 035argument type mismatch (argument 1)
C:\Users\Mivco\Desktop\GameMode.pwn(210) : error 029invalid expressionassumed zero
C
:\Users\Mivco\Desktop\GameMode.pwn(210) : error 017undefined symbol "name"
C:\Users\Mivco\Desktop\GameMode.pwn(210) : error 001expected token";"but found "return"
C:\Users\Mivco\Desktop\GameMode.pwn(210) : fatal error 107too many error messages on one line 
206: if(strlen(INI_String("ZeroAdmin/aka.txt", pIP)) == 0)
207: INI_WriteString("ZeroAdmin/aka.txt", pIP, PlayerName(playerid));
210: if( strfind(INI_String("ZeroAdmin/aka.txt", pIP), PlayerName(playerid), true) == -1 )

I can not


Re: How can I fix it - Sawalha - 07.02.2015

do you have y_ini include included?


Re: How can I fix it - EmpireSk - 07.02.2015

yes I have


Re: How can I fix it - Beckett - 07.02.2015

You need to specifiy the cells.

Example:


pawn Код:
INI_String("Example",example,24);



Re: How can I fix it - EmpireSk - 07.02.2015

Someone help me with errors