XenoBot Forums - Powered by vBulletin

User Tag List

Results 1 to 10 of 22

Thread: Can someone explain Modules a little?

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #9
    Bastiat's Avatar
    Join Date
    Aug 2012
    Location
    Vancouver, BC
    Posts
    44
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Erra View Post
    We seem to be having the same problem actually! @parrode too
    Yeah I pretty much gave up on modules until things are clearer... For now I'll just keep using multiple lua files. It works, it's reliable, and I can easily manually kill the scripts if I want.

    Honestly I'm not even sure what's the advantage of using modules (other than not having to use multiple lua files)... I thought being able to start and stop modules on labels was a great advantage but it doesn't work. Yes I know I could use labels like lua code:
    elseif (Label == "startRingSwitcher") then RingSwitch = true
    elseif (Label == "stopRingSwitcher") then RingSwitch = false
    and then put if RingSwitch then at the top of the module but I feel it's not clean enough.


    ...Plus I'm not even able to make the anonymous function module format work at all lua code:
    --This format doesn't work (or I just have no idea where the hell to put it):
    Module.New('Ring-Switcher', function()

    --This format works... to some extend:
    function RingSwitcher(module)
    Last edited by Bastiat; 03-18-2013 at 10:10 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •