dabo123148 / WarlightMod

Warlight Mod
MIT License
5 stars 12 forks source link

Bug Advanced Diplo Mod V4 (195) : opening PresentMenu as spectator #18

Closed TBestLittleHelper closed 4 years ago

TBestLittleHelper commented 4 years ago

Sorry, the mod has failed. Error: pcall failure in function Client_PresentMenuUI ret=2 [string "require('History'); ..."]:24: attempt to index a nil value (field 'Us')

I recommend something like this at the beginning of present menu --If a spectator, just alert if (game.Us == nil) then UI.Alert("You can't do anything as a spectator"); return; else

dabo123148 commented 4 years ago

Check should be now on the right place(got moved to a wrong position when I edited it) and no longer cause errors