General > Developers Corner
Traitor amount at round start
mirron:
This is what i get. i put it in lua/autostart/server
--- Code: ---[ERROR] addons/ulib/lua/ulib/shared/messages.lua:160: attempt to call method 'IsValid' (a nil value)
1. tsayColor - addons/ulib/lua/ulib/shared/messages.lua:160
2. fn - lua/autorun/server/traitorcount.lua:23
3. Call - addons/ulib/lua/ulib/shared/hook.lua:110
4. unknown - gamemodes/terrortown/gamemode/init.lua:686
Timer Failed! [prep2begin][@gamemodes/terrortown/gamemode/init.lua (line 490)]
--- End code ---
BlueNova:
--- Quote from: mirron on April 04, 2017, 05:01:26 AM ---This is what i get. i put it in lua/autostart/server
--- Code: ---[ERROR] addons/ulib/lua/ulib/shared/messages.lua:160: attempt to call method 'IsValid' (a nil value)
1. tsayColor - addons/ulib/lua/ulib/shared/messages.lua:160
2. fn - lua/autorun/server/traitorcount.lua:23
3. Call - addons/ulib/lua/ulib/shared/hook.lua:110
4. unknown - gamemodes/terrortown/gamemode/init.lua:686
Timer Failed! [prep2begin][@gamemodes/terrortown/gamemode/init.lua (line 490)]
--- End code ---
--- End quote ---
If I'm not mistaken, you placing it in /lua/server/autorun means that it loads before ULX and ULib do. So that may be causing an issue.
iViscosity:
Not necessarily, they're both autorun but this was just being loaded before. Best to put it in a custom ulib modules to guarantee it isn't.
mirron:
done it but still the same
--- Code: ---[ERROR] addons/ulib/lua/ulib/shared/messages.lua:160: attempt to call method 'IsValid' (a nil value)
1. tsayColor - addons/ulib/lua/ulib/shared/messages.lua:160
2. fn - lua/autorun/server/traitorcount.lua:23
3. Call - addons/ulib/lua/ulib/shared/hook.lua:110
4. unknown - gamemodes/terrortown/gamemode/init.lua:686
Timer Failed! [prep2begin][@gamemodes/terrortown/gamemode/init.lua (line 490)]
--- End code ---
mirron:
oh no sorry it worked but it says 0 traitors... the rest is correct
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version