External Posted November 25, 2016 Share Posted November 25, 2016 I've made a script to saves logs into files. The text replaces each other.. For example; He logged in - Logged in the player's file He said something - Logged in the player's file but it replaces the line that was above Link to comment
External Posted November 25, 2016 Author Share Posted November 25, 2016 (edited) so any help? Edited November 25, 2016 by External yolo Link to comment
LoPollo Posted November 25, 2016 Share Posted November 25, 2016 post the line where you write the file. you should set the "pos" at the end of the file to 'append' strings on it Link to comment
ViRuZGamiing Posted November 26, 2016 Share Posted November 26, 2016 local hFile = fileOpen("test.txt") if hFile then fileSetPos( hFile, fileGetSize( hFile ) ) Link to comment
LoPollo Posted November 26, 2016 Share Posted November 26, 2016 even if the write position is at the end it writes from start???? that's weird... try getting result of the setPos and get the pos after setting it. The values should be the same Link to comment
ViRuZGamiing Posted November 26, 2016 Share Posted November 26, 2016 5 hours ago, LoPollo said: even if the write position is at the end it writes from start???? that's weird... try getting result of the setPos and get the pos after setting it. The values should be the same Not really sure what you're trying to say but what I've written does work tho, I've used this in my code as well. 1 Link to comment
LoPollo Posted November 26, 2016 Share Posted November 26, 2016 ops You are right, i thought that you were @External sorry. 4 minutes ago, ViRuZGamiing said: what I've written does work tho I got worried since the code should (and do) work, but since i though that was the code @External was using, i had no idea where the error was. That's why i stated what's below: 5 hours ago, LoPollo said: that's weird... Sorry 1 Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now