Posted by tariel36 on Sun, 05 Dec 2010 11:56:59
Hello, i've got problem with creating my own slash command, or rather make it works.
There is the code:
SLASH_NRH1 = '/rh'; local function handler(msg, editbox) if msg == 'show' then print:("Nuta Raid Helper shown") NRHelper:Show(); elseif msg == 'hide' then print:("Nuta Raid Helper shown") NRHelper:Hide(); else print("You did not type any command") end end SlashCmdList["NRH"] = handler;
When i'm trying to type my commnad (/rh hide for example) it does nothing. But if i remove print function under show and hide commands it works fine. Any tips?
Posted by jnwhiteh on Sun, 05 Dec 2010 12:48:36
You have a syntax error in your code. You have a
:colon after print, which is not valid.
Posted by tariel36 on Sun, 05 Dec 2010 13:06:37
lolz, i'm fkin blind, thx^^