Hi
I need to be able to read origins from a file and write new origins to the same file. To do this I've used
PHP Code:
format(writeLine, charsmax(writeLine), "%s CT,%f,%f,%f", writeLine, gCtOrigin[0], gCtOrigin[1], gCtOrigin[2])
to format a string which I then write with
PHP Code:
write_file(gSpawnsFile, writeLine, gFileLine)
This works when I'm writing a new line (where gFileLine = -1, which means the line didn't exist when I read it) but if I try to overwrite an existing line (gFileLine >= 0), I get an error:
Code:
L 12/28/2010 - 19:52:19: Couldn't create temp file
L 12/28/2010 - 19:52:19: [AMXX] Displaying debug trace (plugin "DefendTheVIP.amxx")
L 12/28/2010 - 19:52:19: [AMXX] Run time error 10: native error (native "write_file")
L 12/28/2010 - 19:52:19: [AMXX] [0] DefendTheVIP.sma::WriteFile (line
Any help with this would be much appreciated!
Thanks.