can someone help?????
 

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

can someone help?????

Started by [NL]trucker, 10 November, 2003, 13:33:17

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

[NL]trucker

i have a script i cant get to work
all the time i get this error:

Syntax Error: expected;
  last token read: `,' at line 44 in file `E:\pkotac build 15.11\scripts\info.lua'
Syntax Error: attempt to concat global `BotName' (a nil value)

and next question can you also make it so that the hubuptime is also shown automaticly whitout the need of sending a command?

here is the script:
--------------------------------------------------------------------------------

-- Uptime by extracted from retrobot By Skrollster
-- Retrobot is made by Tezlo
-- Hiding of command from MainChat is added by JenZen?


BotName = "hubinfo"

sek = 1000
min = sek*60
hour = min*60
days = hour*24

time = 1*hour

function Main()
SetTimer(time)
StartTimer()
end


function DataArrival(user, data)
-- remove end pipe
data=strsub(data,1,strlen(data)-1)
--extract command
_,_,cmd=strfind(data, "%b<>%s+(%S+)")
if(cmd == "uptime") then
local sec = clock()
local days = floor(sec/86400)
local hrs = floor((sec-(days*86400))/3600)
local min = floor((sec-(days*86400)-(hrs*3600))/60)
sec = floor(sec-(days*86400)-(hrs*3600)-(min*60))
user:SendData("uptime", "*** "..days.." days, "..hrs.." hours "..min.."

minutes and "..sec.." seconds")
return 1;
end
end


function OnTimer()
local sec = clock()
local days = floor(sec/86400)
local hrs = floor((sec-(days*86400))/3600)
local min = floor((sec-(days*86400)-(hrs*3600))/60)
sec = floor(sec-(days*86400)-(hrs*3600)-(min*60))
SendToAll(BotName),

"?=============="..frmHub:GetHubName().."=================| ?|"
::HubOwner:[NL]trucker-TeQuilla-hollandse.ko
::Hub-eMail:pfokkink@hotmail.com
::Hub Address: funnyhub.no-ip.info
::HubNetwork: = ?????? Magmar ?????? Network Dutch Division !! Dutch  

Located :) Dus NLers Welkom !! =
::Uptime = "..days.." days, "..hrs.." hours "..min.." minutes and

"..sec.." seconds = ?")
SendToAll(BotName, "?============="..frmHub:GetUsersCount().." of

"..frmHub:GetMaxUsers().." Users Connected==================")
end
end

----------------------------------------------------------------------------------

so if someone could fix this i would very much appriciate it .
Owner of FunnyHub
 
Funyhub.no-ip.info
       Forum Master of


pHaTTy

here you go m8

-- Uptime by extracted from retrobot By Skrollster 
-- Retrobot is made by Tezlo 
-- Hiding of command from MainChat is added by JenZen? 
-- fixed by phatty


BotName = "hubinfo" 

sek = 1000 
min = sek*60 
hour = min*60 
days = hour*24 

time = 1*hour 

function Main() 
	SetTimer(time) 
	StartTimer() 
end 


function DataArrival(user, data) 
	data=strsub(data,1,strlen(data)-1) 
	_,_,cmd=strfind(data, "%b<>%s+(%S+)") 
	if(cmd == "uptime") then 
		local sec = clock() 
		local days = floor(sec/86400) 
		local hrs = floor((sec-(days*86400))/3600) 
		local min = floor((sec-(days*86400)-(hrs*3600))/60) 
		sec = floor(sec-(days*86400)-(hrs*3600)-(min*60)) 
		user:SendData("uptime", "*** "..days.." days, "..hrs.." hours "..min.." minutes and "..sec.." seconds") 
		return 1
	end 
end 


function OnTimer() 
	local sec = clock() 
	local days = floor(sec/86400) 
	local hrs = floor((sec-(days*86400))/3600) 
	local min = floor((sec-(days*86400)-(hrs*3600))/60) 
	sec = floor(sec-(days*86400)-(hrs*3600)-(min*60))
	SendToAll(BotName,"?=============="..frmHub:GetHubName().."=================| ?|") 
	SendToAll(BotName,"::HubOwner:[NL]trucker-TeQuilla-hollandse.ko") 
	SendToAll(BotName,"::Hub-eMail:pfokkink@hotmail.com") 
	SendToAll(BotName,"::Hub Address: funnyhub.no-ip.info") 
	SendToAll(BotName,"::HubNetwork: = ?????? Magmar ?????? Network Dutch Division !! Dutch") 
	SendToAll(BotName,"Located :) Dus NLers Welkom !! = ::Uptime = "..days.." days, "..hrs.." hours "..min.." minutes and "..sec.." seconds = ?") 	
	SendToAll(BotName,"?============="..frmHub:GetUsersCount().." of  "..frmHub:GetMaxUsers().." Users Connected==================") 
end


l8rr,, enjoy ;)
-phatz
Resistance is futile!

[NL]trucker

Phatty thnx m8

i have installed the bot and sofar no errors.

my thanx are endless :-)))
Owner of FunnyHub
 
Funyhub.no-ip.info
       Forum Master of


pHaTTy

np at all m8 glad i cud help :o)
Resistance is futile!

SMF spam blocked by CleanTalk