SA-MP Forums Archive
dini to dini2 conversion error - 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: dini to dini2 conversion error (/showthread.php?tid=648768)



dini to dini2 conversion error - ItzColaBoi - 28.01.2018

So i've tried to convert my whole gamemode from dini to dini2.And its giving me these errors:
Код:
(23902) : error 017: undefined symbol "DINI_frenametextfile"
(32963) : error 017: undefined symbol "DINI_frenametextfile"
(33001) : error 017: undefined symbol "DINI_frenametextfile"
(33188) : error 017: undefined symbol "DINI_frenametextfile"
What to do?Thanks in advance.


Re: dini to dini2 conversion error - BulletRaja - 28.01.2018

put this stock in your Dini2.inc

PHP код:
stock DINI_frenametextfile(oldname[],newname[]) {
    if (!
fexist(oldname)) return false;
    
fremove(newname);
    if (!
DINI_fcopytextfile(oldname,newname)) return false;
    
fremove(oldname);
    return 
true;

Rep if i helped you.


Re: dini to dini2 conversion error - ItzColaBoi - 28.01.2018

Quote:
Originally Posted by BulletRaja
Посмотреть сообщение
put this stock in your Dini2.inc

PHP код:
stock DINI_frenametextfile(oldname[],newname[]) {
    if (!
fexist(oldname)) return false;
    
fremove(newname);
    if (!
DINI_fcopytextfile(oldname,newname)) return false;
    
fremove(oldname);
    return 
true;

Rep if i helped you.
It did compiled without any errors now,but when i join the game and put any name it asks me to login.And userfiles in scriptfiles only lists one thing in .ini file.


Re: dini to dini2 conversion error - Gammix - 28.01.2018

Quote:
Originally Posted by ItzColaBoi
Посмотреть сообщение
It did compiled without any errors now,but when i join the game and put any name it asks me to login.And userfiles in scriptfiles only lists one thing in .ini file.
What version of dini2 do you have?


Re: dini to dini2 conversion error - BulletRaja - 28.01.2018

Quote:
Originally Posted by Gammix
Посмотреть сообщение
What version of dini2 do you have?
If i think you are using old version because the new version is fixed with problem which you having right now

so download latest one from Gammix post and it will work


Re: dini to dini2 conversion error - ItzColaBoi - 28.01.2018

Quote:
Originally Posted by Gammix
Посмотреть сообщение
What version of dini2 do you have?
I used the latest one


Re: dini to dini2 conversion error - BulletRaja - 28.01.2018

Quote:
Originally Posted by ItzColaBoi
Посмотреть сообщение
I used the latest one
i am also using the latest one i didnot got the problem like you getting but i got the problem in old one
new one is fixed and all login register system works perfectly using that


Re: dini to dini2 conversion error - Gammix - 28.01.2018

Then there should be no problem. Re download the current version again, just to make sure and recompile.

If that doesn't work, show us the code where you use Get, Set functions.


Re: dini to dini2 conversion error - ItzColaBoi - 28.01.2018

Quote:
Originally Posted by Gammix
Посмотреть сообщение
Then there should be no problem. Re download the current version again, just to make sure and recompile.

If that doesn't work, show us the code where you use Get, Set functions.
Код:
new tmp3[50],PlayerName[MAX_PLAYER_NAME],string[128];
	GetPlayerName(playerid,PlayerName,MAX_PLAYER_NAME);
	GetPlayerIp(playerid,tmp3,50);
	if(strlen(dini_Get("records.cfg", tmp3)) == 0)
	dini_Set("records.cfg", tmp3, PlayerName);
 	else
	{
	    if( strfind( dini_Get("records.cfg", tmp3), PlayerName, true) == -1 )
		{
  		format(string,sizeof(string),"%s,%s", dini_Get("records.cfg",tmp3), PlayerName);
	   	dini_Set("records.cfg", tmp3, string);
		}
 	}
	new File: file = fopen("accounts.cfg", io_append);
	format(string,sizeof(string),"%s\r\n",PlayerName);
	fwrite(file,string);
	fclose(file);
	return 1;
}
For example here


Re: dini to dini2 conversion error - Gammix - 28.01.2018

Quote:
Originally Posted by ItzColaBoi
Посмотреть сообщение
...
I made a quick test and it works fine. What's the issue(s) you are getting from this?

My test code:
PHP код:
#include <a_samp>
#include <zcmd>
func(ip[], name[]) {
    if(
strlen(dini_Get("records.cfg"ip)) == 0) {
        
dini_Set("records.cfg"ipname);
    }
     else
    {
        if( 
strfinddini_Get("records.cfg"ip), nametrue) == -)
        {
        new 
string[256];
          
format(string,sizeof(string),"%s,%s"dini_Get("records.cfg",ip), name);
           
dini_Set("records.cfg"ipstring);
        }
     }
}
main() {
    
func("1.1.1.1""test");
    
func("1.1.1.1""test1");
    
func("1.1.1.1""test2");
    
func("1.1.1.1""test3");
    
func("1.1.1.1""test4");
    
func("1.1.1.1""test5");




Re: dini to dini2 conversion error - ItzColaBoi - 28.01.2018

Quote:
Originally Posted by Gammix
View Post
I made a quick test and it works fine. What's the issue(s) you are getting from this?
Basically,when i re-installed the include and compiled there were no errors.I joined the game with a name that wasn't registered in the user files and it asks me to login.User file in scriptfiles should show the name,pass,score but it only shows "FareFor=-1".Files are .ini ones


Re: dini to dini2 conversion error - BulletRaja - 28.01.2018

Quote:
Originally Posted by ItzColaBoi
View Post
Basically,when i re-installed the include and compiled there were no errors.I joined the game with a name that wasn't registered in the user files and it asks me to login.User file in scriptfiles should show the name,pass,score but it only shows "FareFor=-1".Files are .ini ones
But this problem is already solved man i am using dini2 its working perfectly


Re: dini to dini2 conversion error - ItzColaBoi - 28.01.2018

Quote:
Originally Posted by BulletRaja
View Post
But this problem is already solved man i am using dini2 its working perfectly
If its solved why would i ask for help?If you know the solution tell me.


Re: dini to dini2 conversion error - Gammix - 28.01.2018

Can you PM/DM me your login and register(with no errors) code so i can test it myself?


Re: dini to dini2 conversion error - ItzColaBoi - 28.01.2018

Quote:
Originally Posted by Gammix
View Post
Can you PM/DM me your login and register(with no errors) code so i can test it myself?
The gamemode is complete and has a lot of lines.I'll pm you on discord.


Re: dini to dini2 conversion error - BulletRaja - 28.01.2018

Quote:
Originally Posted by ItzColaBoi
View Post
The gamemode is complete and has a lot of lines.I'll pm you on discord.
Okk My Discord In My Signature


Re: dini to dini2 conversion error - ItzColaBoi - 28.01.2018

bump


Re: dini to dini2 conversion error - ItzColaBoi - 28.01.2018

Fixed.