PDA

View Full Version : More trouble


Paladin016
05-30-2010, 10:08 AM
-- Register the chat command /duke
addChatCommand("duke");

-- Called when the player first spawns
function onLoaded()
status("Duke Nuke'em's Phrases Are Loaded.");
isLoaded = true;
end

function chatcmd_duke()
rand = math.random(3)

if(rand == 1) then
chatSay("I Have Balls of Steel")
elseif(rand == 2) then
chatSay("Blow it out your ass!")
elseif(rand == 3) then
chatSay("Time to kick ass and chew bubble gum... And i'm all out of gum!")
end

can't get into say chat

bobsapp1
05-30-2010, 12:35 PM
the function chatcmd_duke() u start never ends.... and that is (maybe) the reason why the lua dont load properly, try putting a "end" at the bottom of ur script and see if that works =)

bobsapp1
05-30-2010, 12:41 PM
then after u add that u need to add " ; " after all lines that is not a function call or a end (this is always done in programming, cant tell 100% shure if it gives error in LUA or not but probabily does)