SA-MP Forums Archive
File problem, Crash Server - 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: File problem, Crash Server (/showthread.php?tid=433730)



File problem, Crash Server - usersamp - 28.04.2013

PHP код:
stock LoadFile() 
{
new 
arrCoords[3][64];
new 
strFromFile2[256];
new 
Filefile fopen("file.ini"io_read);
if(!
file

fcreate("file.ini"); 
}
if(
file)
{
fread(filestrFromFile2);
split(strFromFile2arrCoords',');
var0strvalEx(arrCoords[0]);
var1strvalEx(arrCoords[1]);
var2strvalEx(arrCoords[2]);
var3strvalEx(arrCoords[3]);
fclose(file); 

return 
1

The file exist in scriptfiles, why my Server crash? Please help me!


Re: File problem, Crash Server - usersamp - 28.04.2013

I'm sorry, but how?
Thanks!


Re: File problem, Crash Server - [MG]Dimi - 28.04.2013

Right click, Properties (in Windows, home server...) or File Permissions (in FileZilla)


Re: File problem, Crash Server - usersamp - 28.04.2013

I not understand... right click on samp-server.exe?
(I don't use filezille, i do hosting in locate on my pc)


Re: File problem, Crash Server - Lordzy - 28.04.2013

I suggest you to do:
pawn Код:
fopen("file.inc", io_append); //io_append means it creates the file if it's not created
Under that, execute 'fread'. Hope that works!


Re: File problem, Crash Server - usersamp - 28.04.2013

nothing