how to store a string in a file with more than 4 chars
#1

i want to know how to store any string in any file. im packing a string(the line in the file) into my other string. this string is later saved in the same file.
but if i read "Player" later there is just "Play" in the file. but at first why?? and then how can i change this??
Reply
#2

Change the array size?
Reply
#3

it works with numbers.. 48343439943994343 is no problem
Reply
#4

Can you post the part of your script where you add the Player line?
Reply
#5

http://forum.sa-mp.com/index.php?topic=90512.0
Reply
#6

this is in gamemodeinit
Код:
servinf = fopen("serva",io_read);
while(fread(servinf,string,200,false))
	{
	strpack(servi[zeile], string[0],256);
	print(string[0]);
	zeile = zeile +1;
	}
strpack(hbi[0][25],servi[2],256);
fclose(servinf);
and this in the gamemodeexit to write the code
Код:
new string[200];
servinf = fopen("serva",io_write);
strunpack(string,hbi[0][25],256);
format(string,200,"%s\r\n",string);
fwrite(servinf,string);
fclose(servinf);
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)