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



strdel help - Badger(new) - 03.02.2009

hi. i cant get strdel to work in this way (or any other way :S):

0 is saved into a file and i want it to delete 0 and replace it with a different number
Код:
format(Loc, sizeof(Loc), "/PINFO/PWS0/%s.txt", PNAME);
File = fopen(Loc,io_append);
strdel(Loc,1,2);
format(string,sizeof(string),"1");
fwrite(File,string);
fclose(File);
for some reason it works except it saves 1 after 0 instead of deleting 0 and saving 1.


Re: strdel help - Mikep - 03.02.2009

Use dini.


Re: strdel help - Badger(new) - 03.02.2009

i already have dini. i shall read the info on the forums.


Re: strdel help - Badger(new) - 03.02.2009

i tried:
Код:
format(Loc, sizeof(Loc), "/PINFO/PWS0/%s.txt", PNAME);
File = fopen(Loc,io_append);
dini_Unset(Loc,"0");//USING DINI
format(string,sizeof(string),"1");
fwrite(File,string);
fclose(File);
still doesnt work


Re: strdel help - Ghett0 - 04.02.2009

What exactly are you trying to do anyway?


Re: strdel help - Badger(new) - 04.02.2009

i have a file with "0" (no ""s) saved in it. and i want to delete the 0 and save a 1. i can save it fine but when i try to delete the 0, it doesnt work. i tried with dini and strdel.


Re: strdel help - Badger(new) - 04.02.2009

well thanks for the help...