hi
first of all tell u ..i am a newbie
i dont know ant thing except some basics
i tried to used some bots like joke bot but no jokes are runned even when after starting the script
the messsage comes under s as
[22:40] Syntax C:\Downloads\0.3.5.2\scripts\Funscript2.2-Ops.lua:149: attempt to call global 'getn' (a nil value)
plz help....... :-[
change
table.getn
into
table.maxn
good luck :-)
OMFG, post the script in text please. This is by the way Lua4.
Quote from: bastya_elvtars on 13 February, 2007, 19:34:52
OMFG, post the script in text please. This is by the way Lua4.
iInterval = 120; -- in minutes
sBotName = "TimeAnnouncer";
iState = 0;
function Main()
iState = 2;
SetTimer(60 * 1000);
StartTimer();
end
function OnTimer()
if (iState == 1) then
SendToAll(sBotName, "It's "..date("%H:%M").." o'clock.");
elseif (iState == 2 and mod(date("%M") + iInterval, iInterval) == 0) then
SetTimer(iInterval * 60 * 1000);
iState = 1;
SendToAll(sBotName, "It's "..date("%H:%M").." o'clock @ UK-Hubs Safehouse ;-)");
end
end
the error which iamm getting s
[00:10] Syntax C:\Downloads\0.3.5.2\scripts\time.lua:15: attempt to call global 'date' (a nil value)
Plz see the screeen shot bellow & also the error
iInterval = 120; -- in minutes
sBotName = "TimeAnnouncer";
iState = 0;
function Main()
iState = 2;
SetTimer(60 * 1000);
StartTimer();
end
function OnTimer()
if (iState == 1) then
SendToAll(sBotName, "It's "..os.date("%H:%M").." o'clock.");
elseif (iState == 2 and math.modf(os.date("%M") + iInterval, iInterval) == 0) then
SetTimer(iInterval * 60 * 1000);
iState = 1;
SendToAll(sBotName, "It's "..os.date("%H:%M").." o'clock @ UK-Hubs Safehouse ;-)");
end
end
Moved to ConversionRequests.