randommessage by typhoon
 

News:

29 December 2022 - PtokaX 0.5.3.0 (20th anniversary edition) released...
11 April 2017 - PtokaX 0.5.2.2 released...
8 April 2015 Anti child and anti pedo pr0n scripts are not allowed anymore on this board!
28 September 2015 - PtokaX 0.5.2.1 for Windows 10 IoT released...
3 September 2015 - PtokaX 0.5.2.1 released...
16 August 2015 - PtokaX 0.5.2.0 released...
1 August 2015 - Crowdfunding for ADC protocol support in PtokaX ended. Clearly nobody want ADC support...
30 June 2015 - PtokaX 0.5.1.0 released...
30 April 2015 Crowdfunding for ADC protocol support in PtokaX
26 April 2015 New support hub!
20 February 2015 - PtokaX 0.5.0.3 released...
13 April 2014 - PtokaX 0.5.0.2 released...
23 March 2014 - PtokaX testing version 0.5.0.1 build 454 is available.
04 March 2014 - PtokaX.org sites were temporary down because of DDOS attacks and issues with hosting service provider.

Main Menu

randommessage by typhoon

Started by gathering, 29 June, 2005, 22:26:02

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

gathering

im running ptokax 0.3.3.0 build 17.05

and i get this error

No syntax errors in script file randommessage.lua
Syntax ....05.nt_DCinfo.insecure.lv_\scripts\randommessage.lua:32: attempt to call global `getn' (a nil value)

pls help

??????Hawk??????

QuoteOriginally posted by gathering
im running ptokax 0.3.3.0 build 17.05

and i get this error

No syntax errors in script file randommessage.lua
Syntax ....05.nt_DCinfo.insecure.lv_\scripts\randommessage.lua:32: attempt to call global `getn' (a nil value)

pls help


Please post the code

Remember to use the forums [ code]  ,   [ /code]   tags  ( Remove the spaces )

gathering

the script is here

--// This is the Random message the script says upon scriptrestart... 
--// by Typhoon?
--// idea from plop 
--// Quite funny so please leave it , and add others funny comments

BotName = "random"

tScriptQuote = { 
"Bill Gates favorite color is blue. Now you know why windows is so unstable!", 
"Smile... you're dying!", 
"Press Alt-F4 to make me shut up.", 
"I got tree's on my mirror's so my car won't smell!", 
"People are against unneeded violence, but if you feel better after hitting someone to pieces is it then still unneeded violence??",
" I don't stand up for a lady on the train! Why? It's much easyer 2 look at there legs when I sit and they stand!",
" I hate violence! unless i may kick a fakers ass! then i can't get enough of it.",
"What a lot of weirdo's here!",
"Do you really believe that 1+4 = 5 ?? Trust me it's 48!",
"You love me. You hate me. Or you love to hate me! But nomather what i love to kick your ass!!",
"I told your mother 2 search for pron on your computer instead of porn!",
" I can kick more then 1200 users per second. Can you ?? ",
"Sorry i wanted to say a quote but I forgot it? Due to the fact i'm running on windows.",
"Do you know what it means when i say: Prrrrrr Prrrr?? Wel nothing but it scared you!",
"How to solve every windows problem?? easy install linux.",
"Amsterdam, the city of love and peace, you can buy hash from the parking police!",
"I'm not deaf, I'm just ignoring you!","It doesn't mather how fast your computer is, Bill Gates will slow it down anyway!",
"Has anyone seen my dog??","Last christmas my bunny disapeared. Next christmas my dad is gone disapear!","I came. I saw. And i kicked!",
"Can the owner of the car with the license plate AD-39-29  contact the hub owner? It should be parked beside the lake, not in it!","I Am The Mighty Thunder God, Obey Me Or Feel My Wrath !!","I don't believe that I can fly. but I'm sure that bad user can fly, they fly out of here!","At this moment i have a d?j? vu and a loss of memory at the same time. I think I have forgotten this before.."," PLS let me kick everyone, i'm so ****ing bored!"
} 


function Main()
   SendToAll(BotName, tScriptQuote[random(1, getn(tScriptQuote))].."|")
end

jiten

Replace your Main function with this:
function Main()
   SendToAll(BotName, tScriptQuote[math.random(1, table.getn(tScriptQuote))].."|")
end

Best regards,

jiten

gathering

thx its working now

SMF spam blocked by CleanTalk