WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   nUI: Developer Chat (https://www.wowinterface.com/forums/forumdisplay.php?f=96)
-   -   Lua problems (https://www.wowinterface.com/forums/showthread.php?t=25133)

Zaratara 07-01-09 05:41 AM

Lua problems
 
Hello. I am new to this with making addons.
I know some programing like c++ and c# but the problem I have right now is that I can't run my lua files. because I can't find how they are supose to look. I have a scrip looking loke this:

*/
local start, duration, enabled = GetSpellCooldown("Fel Domination");
if enabled == 0 then
DEFAULT_CHAT_FRAME:AddMessage("Fel Domination is currently active, use it and wait " .. duration .. " seconds for the next one.");
elseif ( start > 0 and duration > 0) then
DEFAULT_CHAT_FRAME:AddMessage("Fel Domination is cooling down, wait " .. (start + duration - GetTime()) .. " seconds for the next one.");
else
DEFAULT_CHAT_FRAME:AddMessage("Fel Domination is ready.");
end
\*

but I can't test this because I can't activate it in WoW :(

If you can please help

Thanks

//Zaratara

Akryn 07-01-09 05:55 AM

http://www.wowwiki.com/Creating_a_slash_command

If you don't know how to create the directory structure, just copy a simple addon. You need a .toc and that .lua file at minimum.

spiel2001 07-01-09 06:41 AM

My advice to you would be to start by finding a simple WoW mod and reverse engineering it. I didn't know squat about Lua when I started either. Two invaluable resources to learn about Lua and the WoW API are here:

http://www.wowwiki.com/Portal:Interface_customization
http://www.lua.org/manual/5.1/


All times are GMT -6. The time now is 06:42 AM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI