I’m calling hook.Add in a function already within the gamemode table.
I have ULX installed on my server, and my server console looks like this shortly before it crashes (btw, this is causing server crashing)
Nobody's won the game yet.
GM:RoundEnd called
Nobody's won the game yet.
GM:RoundEnd called
Nobody's won the game yet.
GM:RoundEnd called
Nobody's won the game yet.
GM:RoundEnd called
Nobody's won the game yet.
[ERROR] addons/ulib/lua/ulib/shared/hook.lua:98: stack overflow
1. Call - addons/ulib/lua/ulib/shared/hook.lua:98
2. Call - gamemodes/project-onelife/gamemode/sv_roundhandler.lua:267
3. Call - gamemodes/project-onelife/gamemode/sv_roundhandler.lua:267
4. Call - gamemodes/project-onelife/gamemode/sv_roundhandler.lua:267
5. Call - gamemodes/project-onelife/gamemode/sv_roundhandler.lua:267
6. Call - gamemodes/project-onelife/gamemode/sv_roundhandler.lua:267
7. Call - gamemodes/project-onelife/gamemode/sv_roundhandler.lua:267
8. Call - gamemodes/project-onelife/gamemode/sv_roundhandler.lua:267
9. Call - gamemodes/project-onelife/gamemode/sv_roundhandler.lua:267
10. Call - gamemodes/project-onelife/gamemode/sv_roundhandler.lua:267
11. Call - gamemodes/project-onelife/gamemode/sv_roundhandler.lua:267
12. Call - gamemodes/project-onelife/gamemode/sv_roundhandler.lua:267
13. Call - gamemodes/project-onelife/gamem
“print(“GM:RoundEnd called”)” is the first line of the function, and “print( “Nobody’s won the game yet.” )” is the first line of the if statement the hook.Call is placed in. While you can’t see it,
GM:RoundEnd called
Nobody's won the game yet.
Is being spammed from the top of the console until the end where ULX errors a stack overflow.
[editline]13th November 2017[/editline]
I found the problem. The V wasn’t capitalized in roundvictor.
RIP.