SA-MP Forums Archive
INI_Remove ? - 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: INI_Remove ? (/showthread.php?tid=387359)



INI_Remove ? - benel1 - 24.10.2012

pawn Код:
error 017: undefined symbol "INI_Remove"
pawn Код:
INI_Remove(File);
How do I delete the file to?


Re: INI_Remove ? - gtakillerIV - 24.10.2012

No such thing as INI_Remove, there is something called INI_RemoveEntry which deletes a line in your .ini file.

So use fremove, can be found in Dutlis.inc.


Re: INI_Remove ? - benel1 - 24.10.2012

Quote:
Originally Posted by gtakillerIV
Посмотреть сообщение
No such thing as INI_Remove, there is something called INI_RemoveEntry which deletes a line in your .ini file.

So use fremove, can be found in Dutlis.inc.
but if i want remove file what i need to do ? :O


Re: INI_Remove ? - gtakillerIV - 24.10.2012

Yea use "fremove", it can be found inside Dutlis.inc. Download it.


Re: INI_Remove ? - benel1 - 24.10.2012

Quote:
Originally Posted by gtakillerIV
Посмотреть сообщение
Yea use "fremove", it can be found inside Dutlis.inc. Download it.
pawn Код:
fremove(File);
pawn Код:
error 035: argument type mismatch (argument 1)



Re: INI_Remove ? - gtakillerIV - 24.10.2012

Use it like this:

PHP код:
        new string[128];
        
format(stringsizeof(string), "Users/%s.ini",name);
        
fremove(string); 



Re: INI_Remove ? - benel1 - 24.10.2012

Quote:
Originally Posted by gtakillerIV
Посмотреть сообщение
Use it like this:

PHP код:
        new string[128];
        
format(stringsizeof(string), "Users/%s.ini",name);
        
fremove(string); 
I did it but I do not know if it will work ..
pawn Код:
if (strcmp("/ChangeNick", cmdtext, true, 10) == 0)
    {
        if(GetPlayerMoney(playerid) < 30000) return SendClientMessage(playerid,0xff0000ff,"айп бйгк осфйч лсу блгй мщреъ лйрей");
        ShowPlayerDialog(playerid, DIALOG_CHANGE, DIALOG_STYLE_INPUT, "Change Nick", "длрс аъ длйрей щбшцерк мщреъ амйе", "щрд", "бйием");
        return 1;
    }
pawn Код:
if(dialogid == DIALOG_CHANGE)
    {
        if(!response)
        {
            ShowPlayerDialog(playerid, DIALOG_SURE, DIALOG_STYLE_MSGBOX, "? аъд биез", "? аъд биез щаъд ма шецд мщреъ щн", "шецд", "ма шецд");
        }
        else
        {
            PlayerInfo[playerid][pPass]   = DOF2_GetInt(UserPath(playerid), "Password");
            PlayerInfo[playerid][pKills]  = DOF2_GetInt(UserPath(playerid), "Kills");
            PlayerInfo[playerid][pDeaths] = DOF2_GetInt(UserPath(playerid), "Deaths");
            DOF2_RemoveFile(UserPath(playerid));
            DOF2_CreateFile(inputtext);
            DOF2_SetInt(UserPath(playerid), "Password", PlayerInfo[playerid][pPass]);
            DOF2_SetInt(UserPath(playerid),"Kills",PlayerInfo[playerid][pKills]);
            DOF2_SetInt(UserPath(playerid),"Deaths",PlayerInfo[playerid][pDeaths]);
            format(string,sizeof(string),"%s :щрйъ аъ щок бдцмзд мщн\nара цмн оск жд блгй ма мщлез аъ щок дзгщ\nца одщшъ езжеш ан дщн дзгщ",inputtext);
            ShowPlayerDialog(playerid, DIALOG_NAME, DIALOG_STYLE_MSGBOX, "дщн щмк щерд бдцмзд", string, "айщеш", "");
            GivePlayerMoney(playerid, Money);
            Kick(playerid);
        }
        return 1;
    }



Re: INI_Remove ? - benel1 - 24.10.2012

Quote:
Originally Posted by ******
Посмотреть сообщение
If you don't know if it will work, test it. Also, fremove is part of file.inc - the default include, not any other third party include.
I do not how to check I build things for fun ..
- My computer is not good ..
Just tell me please if the code works or not ..


Re: INI_Remove ? - gtakillerIV - 24.10.2012

Then why bother learn how to script if you have a slow PC that can't even run Gta SA?

A low spec PC can run Gta Sa without lag.


Re: INI_Remove ? - benel1 - 24.10.2012

Quote:
Originally Posted by ******
Посмотреть сообщение
You don't need to run SA to test most server scripts - just start the server and see if that file disappears. I only reinstalled SA the other day after months of scripting without it.
I moved to DOF2 and it works great thanks