Hey guys. Was wondering if anyone would be kind enough to fix the LUA coding for this Garrys Mod 12 Stool. I tried it myself but as i am not a lua coder i'm not too sure what i was doing. Thanks in advance should anyone help out.
sensor.zip | garrysmods.org
Even if anyone would do this work for free, fix what? No one is just going to look through the entire Script to find the bug or whatever.
People with code with error messages that tell them where a error occured, like in what line, what function etc.
It isn't an error that needs fixing. The script is using gmod 12's outdated lua coding. It's a very short script and i've asked on this forum before without problem so i figured it would be an easy task for someone who is skilled at lua
It does not seem to be outdated. I uses stuff like IsValid instead of ValidEntity so it should work fine. What exactly isn't working?
The issue i'm recieving is this:
[ERROR] lua/weapons/gmod_tool/stools/sensor_tool.lua:52: attempt to index a nil value
1. LeftClick - lua/weapons/gmod_tool/stools/sensor_tool.lua:52
2. unknown - gamemodes/sandbox/entities/weapons/gmod_tool/shared.lua:240
On top of that. The tool name in the upper left corner displays "#tool.sensor_tool.name" instead of the actual name and the info below it is the same. I tried fixing things up myself by reading Garry's web page on his website about updating the lua but to no success. Again i have no experience in lua haha.
I figured i'd come here for help i didn't intend to come off as a freeloader.
For the strings starting in #, you'll want to add language strings:
language.Add("tool.sensor_tool.name", "Sensor")
Like that.
As for line 52, replace it with this:
ent:SetAngles(tr.HitNormal:Angle() + Angle(90, 0, 0))
Nice! This fixed the error however although im getting no errors i cant seem to get the tool to actually work sadly.. as in it doe's nothing once passed despite setting the key to emulate.
Lua*
Sorry, you need to Log In to post a reply to this thread.