Any way to see where a specific function in an addon?
6 replies, posted
Alright, basically, someone decided to either override CanPlayerEnterVehicle or return true on that. I know this is the case because my hook seems to do fine with all workshop addons disabled.
When I run type 'lua_run MsgN(PrintTable(hook.GetTable()))' in console, this comes up:
[code]
CanPlayerEnterVehicle:
ARRDontGoIn = function: 0x1adc7830
RagMorphDenyVehicleUsage = function: 0x1b0d08f0
InstrumentChairHook = function: 0x40ff0ce0
ARCDisplacerCarFix = function: 0x1b10bae0 -- This is mine
EnterSeat = function: 0x3169a980
[/code]
Any help WOULD be appreciated.
[QUOTE=LegoGuy;41697852]Alright, basically, someone decided to either override CanPlayerEnterVehicle or return true on that. I know this is the case because my hook seems to do fine with all workshop addons disabled.
When I run type 'lua_run MsgN(PrintTable(hook.GetTable()))' in console, this comes up:
[code]
CanPlayerEnterVehicle:
ARRDontGoIn = function: 0x1adc7830
RagMorphDenyVehicleUsage = function: 0x1b0d08f0
InstrumentChairHook = function: 0x40ff0ce0
ARCDisplacerCarFix = function: 0x1b10bae0 -- This is mine
EnterSeat = function: 0x3169a980
[/code]
Any help WOULD be appreciated.[/QUOTE]
Override it yourself and see where it gets called? I don't know how exactly workshop addons work since I've never used them, but you should be able to use that method to find what is calling that function, and from there disable each addon one at a time to see which one is causing the problem.
You could extract the addons, or use Notepad++ to search the addon files ( The Lua portion is stored as plain text inside the file ) to see which addon is providing Lua which breaks your hook..
[QUOTE=SashaWolf;41697887]Override it yourself and see where it gets called? I don't know how exactly workshop addons work since I've never used them, but you should be able to use that method to find what is calling that function, and from there disable each addon one at a time to see which one is causing the problem.[/QUOTE]
How would I see where it gets called?
[QUOTE=LegoGuy;41698105]How would I see where it gets called?[/QUOTE]
This might work
[url]http://maurits.tv/data/garrysmod/wiki/wiki.garrysmod.com/index4277.html[/url]
To get the locations of the files that the hooks exist you could run this script :
[lua]
for k,v in pairs(hook.GetTable()["CanPlayerEnterVehicle"]) do
print( k .. " is in lua file : " debug.getinfo( v ).short_srv );
end
[/lua]
[QUOTE=>>oubliette<<;41698194]To get the locations of the files that the hooks exist you could run this script :
[lua]
for k,v in pairs(hook.GetTable()["CanPlayerEnterVehicle"]) do
print( k .. " is in lua file : " debug.getinfo( v ).short_srv );
end
[/lua][/QUOTE]
Well, this helps a bit, but it still doesn't tell me what workshop addon they are in.
[editline]3rd August 2013[/editline]
Nevermind, I saw via the path it gave me.
Turns out the GMT Playable Piano was overriding it.
[editline]3rd August 2013[/editline]
Thank you all! This helped me so much.
Sorry, you need to Log In to post a reply to this thread.