PtokaX forum

PtokaX => Bugs => Topic started by: gathering on 29 June, 2005, 22:26:02

Title: randommessage by typhoon
Post by: gathering on 29 June, 2005, 22:26:02
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
Title:
Post by: ??????Hawk?????? on 29 June, 2005, 22:33:41
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 )
Title:
Post by: gathering on 29 June, 2005, 22:36:21
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
Title:
Post by: jiten on 29 June, 2005, 22:54:47
Replace your Main function with this:
function Main()
   SendToAll(BotName, tScriptQuote[math.random(1, table.getn(tScriptQuote))].."|")
end

Best regards,

jiten
Title:
Post by: gathering on 29 June, 2005, 23:17:32
thx its working now