I'm jsut trying to make a script in Super Duper Macro that will select a random message from a list and send it.
This code returns no errors, but also does nothing. The code check tools i could find say nothing is wrong with it. Anyone know what i'm doing wrong?
Thanks!
Code:-- Seed the random number generator math.randomseed(os.time()) -- List of messages list1 = { "Call1", "call2" } -- Number of messages -- Updated to reflect the actual number of messages in list1 listnum = #list1 -- Random Message Choice function messagenum() -- Generate a random index between 1 and listnum local randomIndex = math.random(1, listnum) -- Access the message from list1 using the random index local selectedMessage = list1[randomIndex] -- Send the selected message -- SendChatMessage("Hello", "PARTY") SendChatMessage(selectedMessage, "PARTY") end
Quote