KGPanels Vehicle Script not working
Hi All,
I have the following in my kgpanels.lua: ["LOAD"] = "self:RegisterEvent(\"UNIT_ENTERED_VEHICLE");n self:RegisterEvent(\"UNIT_ENTERING_VEHICLE");n self:RegisterEvent(\"UNIT_EXITING_VEHICLE");n self:RegisterEvent(\"UNIT_EXITED_VEHICLE\");", ["EVENT"] = "if (event == \"UNIT_ENTERED_VEHICLE\") then\n if ( arg1 == \"player\" ) then\n self.hide = true;\n end\n else if ( event == \"UNIT_EXITED_VEHICLE\" ) then\n if ( arg1 == \"player\" ) then\n self.show = true;\n end\n end\n When I enter a vehicle, nothing happens. When I added the scripts to the onLoad and onEvent settings for the panel they were accepted as being valid. Anybody got any ideas as to why this isn't working? Thanks In Advance. end" |
Tried moving the RegisterEvents to the onEvent setting for the kgpanel but still doesn't work.
Does nobody have any ideas? |
It's just self:Hide() not self.hide = true, self:Show() etc.
Edit: typo, colons not "." |
Thanks for that, I'll give it a try tonight ;-)
|
Quote:
Date: 2010-07-27 00:09:27 ID: 2 Error occured in: Global Count: 1 Message: [string "HUD_OnEvent"] line 11: attempt to call method 'show' (a nil value) Debug: [C]: show() [string "HUD_OnEvent"]:11: [string "HUD_OnEvent"]:1 Pretty much the same error occurs on both vehicle entry and exit. |
show is not the same as Show
|
You are absolutely right....I didn't realise LUA was case sensitive, will try later.
Someone should update the KGPanels website, which is where I got my script from in the first place. Thanks. |
It's also Lua (the Portuguese word for 'moon') and not LUA. ;) But that's a different topic. ;)
|
All times are GMT -6. The time now is 03:46 PM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI