07.12.2015, 21:22
You're welcome 
I'm getting more and more confused with this. This is my code:
The formatting seems to crash the server most of the time (Not always) when one of the lines in the file contains a very long string.
"test"
doesn't crash, but
"ITSC_LIGHTHEAL{equipped{0}amount{1}}ITMI_RAKE{equipped{0}amount{1}}ITFO_APPLE{equipped{0}amount{199}}ITPL_TEMP_HERB{equipped{0}amount{1}}" does.
When I don't format, it doesn't crash and when I print out the buffer-variable, it works fine, concatenation doesn't work properly though. When concatenating it will only use a few letters and cut the rest off for some reason. I need to concatenate though, since there seems to be a maximum length when using fileRead and I am saving the inventory of the players as a big string.
I'm running out of ideas how to work around this, so: What am I doing wrong? O.o I just don't get it.

I'm getting more and more confused with this. This is my code:
Code:
local file = fileOpen("saveFiles/Players/" + name + ".txt", "r+");
local buffer = "";
while(fileRead(file, buffer))
{
buffer = format("%s", buffer);
}
The formatting seems to crash the server most of the time (Not always) when one of the lines in the file contains a very long string.
"test"
doesn't crash, but
"ITSC_LIGHTHEAL{equipped{0}amount{1}}ITMI_RAKE{equipped{0}amount{1}}ITFO_APPLE{equipped{0}amount{199}}ITPL_TEMP_HERB{equipped{0}amount{1}}" does.
When I don't format, it doesn't crash and when I print out the buffer-variable, it works fine, concatenation doesn't work properly though. When concatenating it will only use a few letters and cut the rest off for some reason. I need to concatenate though, since there seems to be a maximum length when using fileRead and I am saving the inventory of the players as a big string.
I'm running out of ideas how to work around this, so: What am I doing wrong? O.o I just don't get it.