hi, i have been trying to get a Gmod 12 addon to work with Gmod 13. i have made a post in another thread, but that thread seemed dea, and this is probably a such a small issue, that it would be faster to just make a new thread than to bump an old one. here is the addon i am trying to convert. http://www.garrysmod.org/downloads/?a=view&id=81139
(i am only trying to convert the storm/ tornado part, the effects part was already converted). this addon added some entities (which use wire) which create storms and tornados
after putting it into gmod, i changed the “info.txt” into addon.txt. and it did seem to have load into gmod, since it produced this LUA error
[ERROR] addons/weather/lua/entities/wm_lightning/cl_init.lua:5: bad argument #2 to 'Exists' (string expected, got no value) 1. Exists - [C]:-1 2. unknown - addons/weather/lua/entities/wm_lightning/cl_init.lua:5 [ERROR] addons/weather/lua/entities/wm_tornado/cl_init.lua:6: bad argument #2 to 'Exists' (string expected, got no value) 1. Exists - [C]:-1 2. unknown - addons/weather/lua/entities/wm_tornado/cl_init.lua:6
also, none of the entities showed up anywhere under the entities tab or anywhere in the game
i tried to fix this error by going to the files and sections noted in the error, i changed the naming of some lua stuff (which were outdated) into this
if(file.Exists("../materials/entities/wm_lightning_killicon.vmt", "MOD")) then killicon.Add("wm_lightning","entities/wm_lightning_killicon",Color(255,255,255)) (in the cl_init.lua file under addons/weather/lua/entities/wm_lightning) and... if(file.Exists("../materials/entities/wm_tornado_killicon.vmt", "MOD")) then killicon.Add("wm_tornado","entities/wm_tornado_killicon",Color(255,255,255)) (in the cl_init.lua file under addons/weather/lua/entities/wm_tornado)
after i did that, the lua errors iun the console were gone, the console also showed signs that the addon was working (the addon normally tells you that conditions are “right” for a storm, and it was doing that in gmod 13." however, the actual spawnable entities dont show up in game. i am hoping that one of you far more experienced lua coders could help me fix this. (its my first day with lua).
thanks for any help!