[lua]timer.Simple(1, function() for i=1,3 do file.Append("s.txt", "LogeD") end end)[/lua]
Doing this through ply:sendlua()
This looks bad, i know, but its for speed tests, Every second, it does not write logged 3 times to that file no error
[QUOTE=74pantera;45685101][lua]timer.Simple(1, function() for i=1,3 do file.Append("s.txt", "LogeD") end end)[/lua]
Doing this through ply:sendlua()
This looks bad, i know, but its for speed tests, Every second, it does not write logged 3 times to that file no error[/QUOTE]
Run this:
[CODE]
timer.Simple( 1, function()
for i = 1, 3 do
print( i )
end
end )
[/CODE]
does it print anything?
[QUOTE=CallMePyro;45685237]Run this:
[CODE]
timer.Simple( 1, function()
for i = 1, 3 do
print( i )
end
end )
[/CODE]
does it print anything?[/QUOTE]
yes. 1 2 and 3
Are you sure s.txt exists?
[QUOTE=74pantera;45685410]yes. 1 2 and 3[/QUOTE]
In that case it is not a problem with timer.Simple
[QUOTE=blakeguy25;45685549]In that case it is not a problem with timer.Simple[/QUOTE]
I want it to write in that file LogeD every second, though.
Then use timer.Create("name", timeelapsed, reps, func). Timer.Simple only has one rep
[QUOTE=crazyscouter;45685621]Then use timer.Create("name", timeelapsed, reps, func). Timer.Simple only has one rep[/QUOTE]
worked, thanks
Sorry, you need to Log In to post a reply to this thread.