PDA

View Full Version : some trouble


Paladin016
05-29-2010, 07:52 PM
i need help with this script... it doesn't really work.

-- Register the chat command /test
addChatCommand("test");

-- Called when the player first spawns
function onLoaded()
status("Test monitor loaded.");
isLoaded = true;
end

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

if(rand == 1) then
chatWorld("I Like Cookies And French Fries")
elseif(rand == 2) then
chatWorld("Cookie!")
elseif(rand == 3) then
chatWorld("ASDFJKL;!")
end
end

DeathStalker908
05-29-2010, 09:05 PM
lol, noob.......(HINT HINT)

spiker8420
05-29-2010, 10:09 PM
tht would be a funny addon XD

yneos
05-29-2010, 10:33 PM
i hope you dont get help for this i dont want to see random crap in the world chat more then it already is lol

DeathStalker908
05-30-2010, 12:53 AM
i hope you dont get help for this i dont want to see random crap in the world chat more then it already is lol

Yeah, in my initial post I wrote the clear solution, but I decided to just edit it and write what you can currently see because I didnt want to see stupid crap popping up in the world chat.

Jesus, the problem is SO OBVIOUS

KingApocalypse
05-30-2010, 02:27 AM
i think its the dot after loaded

just a guess...:P

Torax
05-30-2010, 03:50 AM
Change:


function chatcmd_noob()


To:


function chatcmd_test()


The name of the function has to be the same as what you register the chat command as. In this case you used "test" as the chat command so you need to make your function chatcmd_test.

DeathStalker908
05-30-2010, 04:08 AM
great, now the world chat is gonna be spammed with retarded stuff :(

bobsapp1
05-30-2010, 12:37 PM
great, now the world chat is gonna be spammed with retarded stuff :(

i been to pvp and i think all hope about u guys is lost already =)