upking
New Member
- Joined
- Jun 13, 2010
- Messages
- 4
- Reaction score
- 0
Hi, well I've made a globalevent that runs regularly to compare 2 files if one of them is different the server will shutdown
The problem is... It runs well but sometimes this error occurs and generally it end up crashing the server when the server save happens.
Here's the console screen:
And this is the code I've made:
I'm using TFS 0.4 r3884
The problem is... It runs well but sometimes this error occurs and generally it end up crashing the server when the server save happens.
Here's the console screen:
![2z6ceub.jpg](/proxy.php?image=http%3A%2F%2Fi41.tinypic.com%2F2z6ceub.jpg&hash=ec80167735b43c67fcd719566c33ff80)
And this is the code I've made:
Code:
function onThink()
local file = io.open('ip.txt','r')
local ip = file:read(-1)
file:close()
local filestart = io.open('ipstart.txt','r')
local ipstart = filestart:read(-1)
filestart:close()
if ip ~= ipstart then
doSetGameState(GAMESTATE_SHUTDOWN)
end
return true
end
I'm using TFS 0.4 r3884