[22:40] Syntax C:\Downloads\0.3.5.2\scripts\Funscript2.2-Ops.lua:149: attempt to
 

[22:40] Syntax C:\Downloads\0.3.5.2\scripts\Funscript2.2-Ops.lua:149: attempt to

Started by tom_cruise4g, 13 February, 2007, 18:19:20

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

tom_cruise4g

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....... :-[

Leun



bastya_elvtars

Everything could have been anything else and it would have just as much meaning.

tom_cruise4g

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

bastya_elvtars

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.
Everything could have been anything else and it would have just as much meaning.

SMF spam blocked by CleanTalk