Atmosphere problem ' [ERROR] attempt to index upvalue 'emitter3d' (a nil value)


I was trying to fix some stuff in the old gm-atmos addon (Created by Looter),
After I managed to fix the vector problems I stumbled upon this one.

[ERROR] addons/atmos/lua/atmos/client/atmos_nature.lua:838: attempt to index upvalue 'emitter3d' (a nil value)
  1. v - addons/atmos/lua/atmos/client/atmos_nature.lua:838
   2. unknown - lua/includes/modules/hook.lua:82

And this is the file.


I’m alone in this cold and dark thread.

I actually think I fixed that addon a long time ago. Was that the one with the big cartoony looking clouds and sun? Sun beams and all that?

But, it appears it creates the emitter on InitPostEntity, unfortunately the player isn’t always fully joined at that point. You could add a timer, or detect when the player has fully joined.

Also, I recommend using a different smoke-sprite. I’ve been able to make the game crash using those smoke sprites alone.