• What happens to the client-side LUA when you retry to a server?
    12 replies, posted
Does anyone know? Is it reset? Does it reload? Does it just refresh? Needed for an add-on. Thanks
Wouldn't it be reset? It's the same thing as d/c
Doesn't retry disconnect and then reconnect instantly? I think that's why when you try to retry and people are queued, you might be kicked because server is full because they took your spot.
Current state is destroyed and a new one is created.
Well, i'm pretty sure that [U]each time you change CS files on server, they're re-sent to the client[/U]. So, if you're asking if you have to re-connect after each CS code change, the answer is [I]No[/I].
[QUOTE=ExtReMLapin;43780632]Well, i'm pretty sure that [U]each time you change CS files on server, they're re-sent to the client[/U]. So, if you're asking if you have to re-connect after each CS code change, the answer is [I]No[/I].[/QUOTE] You're right; when you update cs files they are auto sent and executed. If it's a new file; you need to edit an old file on the same realm, and then edit the new file at least once for it to transfer and execute.
[QUOTE=Acecool;43780653]You're right; when you update cs files they are auto sent and executed. If it's a new file; you need to edit an old file on the same realm, and then edit the new file at least once for it to transfer and execute.[/QUOTE] Files are automatically updated only when server is working on win32. I guess, garry didn't hook file update on Linux, so on Linux files have to be updated manually.
And by updated manually; you can create your own concommand and hook system. When I rewrote the auto-refresh system for my game-mode to only reload the file which was changed, plus the data which is cleared on autorefresh such as GM, timed events and timers, I figured it out that it's sometimes easier just to call a console command. If you set up a recursive loader in a concommand, it won't matter too much the load order after it's been loaded once; albeit better to preserve depending on how it's coded. Loose code = preserve. Helper-functions and classes = egal. Let me know if you need help with that, feel free to shoot me a pm.
Alright, thanks guys. Big help. Solved
[QUOTE=Acecool;43781544]And by updated manually; you can create your own concommand and hook system. When I rewrote the auto-refresh system for my game-mode to only reload the file which was changed, plus the data which is cleared on autorefresh such as GM, timed events and timers, I figured it out that it's sometimes easier just to call a console command. If you set up a recursive loader in a concommand, it won't matter too much the load order after it's been loaded once; albeit better to preserve depending on how it's coded. Loose code = preserve. Helper-functions and classes = egal. Let me know if you need help with that, feel free to shoot me a pm.[/QUOTE] lua_openscript <main script> is enough, genius. If i need to reload gamemode script i just do: lua_run GM = {} lua_openscript init.lua lua_run GAMEMODE = GM -- may also be table.Copy( GAMEMODE, GM ) for SWEPs and SENTs you can just use weapon.Register/scripted_ents.Register to update them so your script is useless. Oh, also, did you copyright'd your "recursive loader in a concommand" already?
[QUOTE=Acecool;43781544]And by updated manually; you can create your own concommand and hook system. When I rewrote the auto-refresh system for my game-mode to only reload the file which was changed, plus the data which is cleared on autorefresh such as GM, timed events and timers, I figured it out that it's sometimes easier just to call a console command. If you set up a recursive loader in a concommand, it won't matter too much the load order after it's been loaded once; albeit better to preserve depending on how it's coded. Loose code = preserve. Helper-functions and classes = egal. Let me know if you need help with that, feel free to shoot me a pm.[/QUOTE] I have nothing against you.. but can you please stop fucking mentioning your 'all mighty lua refresher' in each freakin' post? Nobody cares if the script loads in 0.5ms or 0.499999999999999(9)ms and if you made a 'refresher' for your own gamemde - well, good for you, but stop telling us about it each time you have opportunity to mention it..
Cool story Acecool, no one cares. Congratulations in gaining a marginal performance gain, complicating your code, and of course, flaunting an insignificant action that has stupid written all over it.
[QUOTE=Netheous;43784395]I have nothing against you.. but can you please stop fucking mentioning your 'all mighty lua refresher' in each freakin' post? Nobody cares if the script loads in 0.5ms or 0.499999999999999(9)ms and if you made a 'refresher' for your own gamemde - well, good for you, but stop telling us about it each time you have opportunity to mention it..[/QUOTE] lol
Sorry, you need to Log In to post a reply to this thread.