lzinga / TTTWeightedTraitorSelection

A Garrys Mod TTT addon that improves the traitor selection process
Other
11 stars 6 forks source link

LocalPlayer a nil value when trying to write version info. #13

Closed lzinga closed 7 years ago

lzinga commented 7 years ago

@KajTorvaldGrey messaged me with this error on Steam. This is for when the system checks for a new version here on github.

Link to location https://github.com/lzinga/TTTWeightedTraitorSelection/blob/master/tttweightsystem/lua/autorun/weightsystem_autorun.lua#L115

[ERROR] lua/autorun/weightsystem_autorun.lua:115: attempt to call global 'LocalPlayer' (a nil value)
1. onsuccess - lua/autorun/weightsystem_autorun.lua:115
2. unknown - lua/includes/modules/http.lua:35

Last time I was working on this addon it was working, so maybe something changed with LocalPlayer method or just need to change it so it has a nil check or loop over all players in the game and write it instead of using LocalPlayer.

LaurenceKaye commented 7 years ago

I fixed this in my fork and never pull requested it for some reason. I'll clean it up and request it.

LaurenceKaye commented 7 years ago

Fixed by #14