SA-MP Forums Archive
Whats wrong ? - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Whats wrong ? (/showthread.php?tid=273006)



Whats wrong ? - 963852741 - 30.07.2011

It crashs my server. whats wrong ?
PHP Code:
    if(dialogid == 1) { 
    new 
file[128], name[MAX_PLAYER_NAME], str[128]; 
        
GetPlayerName(playeridnameMAX_PLAYER_NAME); 
        
format(filesizeof(file), "scriptfiles/UsersNEW/%s.ini"name); 
        if(
response) { 
            if(
strlen(inputtext)) { 
                
dini_Create(file); 
                
dini_IntSet(file"pw"num_hash(inputtext)); 
                
dini_IntSet(file"AdminLevel"PlayerInfo[playerid][AdminLevel]); 
                
dini_IntSet(file"cash"PlayerInfo[playerid][cash]); 
                
dini_IntSet(file"level"PlayerInfo[playerid][level]); 
                
format(strsizeof(str), "You are registered as ~r~%s. Your password is ~r~%s. /changepass to change it"nameinputtext); 
                
SendClientMessage(playeridCOLOR_WHITEstr); 
                
PlayerInfo[playerid][level] = dini_Int(file"level"); 
                
PlayerInfo[playerid][cash] = dini_Int(file"cash"); 
                
PlayerInfo[playerid][AdminLevel] = dini_Int(file"AdminLevel"); 
            } 
        } 
        else { 
            
Kick(playerid); 
        } 
    } 



AW: Whats wrong ? - samtey - 30.07.2011

A little more information!

What was the last thing of the script u added before ur server crashed?


Re: Whats wrong ? - 963852741 - 30.07.2011

Register Sys
Thats the register sys, after i added it, it crashed the server everytime i typed my password in dialog


Re: Whats wrong ? - Kush - 30.07.2011

The problem is you need to remove that Dini.


Re: Whats wrong ? - Guest3598475934857938411 - 30.07.2011

LOL, did you made the folders scriptfiles and then UsersNEW inside the scriptfiles folder so you would have like

scriptfiles > scriptfiles > UsersNEW

Folder's don't exist = your server crashing :S


Re: Whats wrong ? - 963852741 - 31.07.2011

I created the server, and deleted the scriptfiles...
Anyway, i deleted this system.
if someone can help me in it's progress, i will be happy.


Re: Whats wrong ? - Kush - 31.07.2011

Quote:
Originally Posted by 963852741
View Post
I created the server, and deleted the scriptfiles...
Anyway, i deleted this system.
if someone can help me in it's progress, i will be happy.
You've actually done the right thing by switching that system. Now, if your looking for a File Management/saving system, use Y_INI otherwise MySQL. For Command Processing, might I recommend YCMD as there are wayy better features.