Slash Commands
I'm trying to make a mode, simple to give me some more slash commands. I've created the .toc and a .lua file as per what I've seen in other mods.
The .lua file just contains the following Code:
SLASH_TOGGLEHELM = "/toggleHelm" |
Code:
SlashCmdList["toggleHelm"] = toggleHelm() Code:
SlashCmdList["TOGGLEHELM"] = toggleHelm |
Don't you have to use caps in the line
Code:
SlashCmdList["BLAH"] = whatever() Code:
TOGGLE_HELM1 = "/togglehelm" EDIT : See above post, it's more right. |
This is the entire lua file. But this doesn't work. It doesn't seem to recognise the / commands at all.
Code:
SLASH_TOGGLEHELM = "/toggleHelm" |
Code:
SLASH_TOGGLEHELM1 = "/toggleHelm" Also you should move your function-definitions at the top of the file, because at the moment where you use them in SlashCmdList they are "nil" / not defined. |
Quote:
|
Quote:
However, it would be better if they were not global anyway: Code:
local function toggleHelm() |
All times are GMT -6. The time now is 09:53 AM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI