PtokaX forum

Archive => Archived 4.0 boards => Help with Lua 4 scripts => Topic started by: Lars on 30 December, 2004, 18:47:21

Title: Need help
Post by: Lars on 30 December, 2004, 18:47:21
function Main()
   frmHub:UnregBot(BOTName)
   frmHub:RegBot(BOTName)
   SendToAll("( >>>>  "..Version.." Started"..date(" the %d/%m-%Y at %X ").."  <<<< )")
   TimeSpanInMinutes = 1              --> sets Hubstats time in minutes
   BOTNameInfo = "$MyINFO $ALL "..BOTName.." <++V:0.1 Dumle,C:and [SU+]Lars> $ $Black Light"..strchar( 1 )..""
   SendToAll(BOTNameInfo)
   AddProfile("Moderator", 4269273088)
   SetTimer(TimeSpanInMinutes*60000)
   StartTimer()
   guardGlobals()
end

function OnTimer()
   SendAdMessage()
end

function SendAdMessage()
   upline = "============H=U=B==S=T=A=T=S=========="
   underline = "======================================="
   hubstats = "\r\n\r\n"..upline.."\r\n"..
       "      ?Script Version:           "..Version.."\r\n"..
       "      ?Script Creator:              "..Creators.."\r\n"..
       "      ?Hub Name:               "..sHubName.."\r\n"..
       "      ?Hub Description:          "..sHubDesc.."\r\n"..
       "      ?Hub Adress:             \r\n"..
       "      ?Owner:           Lars".."\r\n"..
       "      ?Online Users:          "..sUserCount.."\r\n"..
       "      ?Redirect Adress:          "..sRedirect.."\r\n"..
       "      ?Maximum Users:          "..sMaxUsers.."\r\n"..
       "      ?Minimum Share:          "..sMinShare.." in bytes".."\r\n"..
       "      ?Total Share in the hub:          "..sCurrentShare.." in bytes".."\r\n"..
       "      ?Hub Network:           !network".."\r\n"..
       "      ?Hub Rules:              !rules".."\r\n"..underline.."\r\n".." "

      SendToAll(BOTName, hubstats)
end


when the bot is loading AdMessages this is showing up in Ptokax TD4

Syntax Error: assignment to undefined global `upline'

whats wrong ?(
Title:
Post by: plop on 30 December, 2004, 22:40:39
your missing a part of the script.
better search for an alternative, there are several scripts like this posted on this board.

plop
Title:
Post by: Lars on 30 December, 2004, 23:03:39
Nice there Mutor!

must thank you for the help
 
and its works perfectly.. :))