User Tag List

Page 1 of 2 1 2 LastLast
Results 1 to 10 of 11

Thread: Lua Help

  1. #1
    Clicker Fusion 2.5 DeveloperHTML5 Export Module

    Join Date
    Jun 2006
    Posts
    1,469
    Mentioned
    10 Post(s)
    Tagged
    0 Thread(s)

    Lua Help

    I am just starting with the Lua Object. So I found the example in The Daily Click of how to use Lua script and MMF2. But I cannot seem to get it to work.

    I created a test app with one frame. Added the Lua Object. In script I added:

    function damage (attack, defense)
    dam = attack - defense
    return dam
    end

    I then call the function damage passing in "20|2"
    So I should get back 18

    I then tell it to set a text of the text box to the
    returned string of function damage.

    But don't get anything. I can tell it to get the return count and it is 1.

    What am I doing work???

    At Start of Frame

  2. #2
    Clicker Fusion 2.5 DeveloperHTML5 Export Module

    Join Date
    Jun 2006
    Posts
    1,469
    Mentioned
    10 Post(s)
    Tagged
    0 Thread(s)

    Re: Lua Help

    Found the problem. The index for the return string is 0 based. I had is set to 1 assumning that if you say return 1 it would be 1 based also to match the call on return.


  3. #3
    Clicker Fusion 2.5 DeveloperHTML5 Export Module

    Join Date
    Jun 2006
    Posts
    1,469
    Mentioned
    10 Post(s)
    Tagged
    0 Thread(s)

    Re: Lua Help

    In the help I see there is "run file" and "run script".

    I assume this means that in "run file" the Lua script is store external to MMF2 .exe whereas with "run script" the Lua script is stored within the MMF2 .exe. Is this correct???

    Can you have more than one Lua object. For example, lets say I want to break my Lua functions up into groups. Like a data access group or a display group. Can I have a Lua Object-Data Access Functions and a Lua Object-Display Funtions???

  4. #4
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleSWF Export ModuleUnicode Add-on
    Looki's Avatar
    Join Date
    Aug 2006
    Location
    Karlsruhe, Germany
    Posts
    3,741
    Mentioned
    5 Post(s)
    Tagged
    1 Thread(s)

    Re: Lua Help

    Hi,

    Please stop right here and use the XLua extension which is superior to the Lua Object in every way.

    http://www.clickteam.com/epicenter/ubbthreads.php?ubb=showflat&Number=226974&Searchpa ge=2&Main=18449&Words=xlua&Search=true#Post226974

  5. #5
    Clicker Fusion 2.5 DeveloperHTML5 Export Module

    Join Date
    Jun 2006
    Posts
    1,469
    Mentioned
    10 Post(s)
    Tagged
    0 Thread(s)

    Re: Lua Help

    Yes I just found that. But no help file and the website if you click on it you get access not allowed.

    So is this a fully supported Lua Object by Clickteam and is there a cost of use it in an application???


  6. #6
    Clicker Fusion 2.5 DeveloperHTML5 Export Module

    Join Date
    Jun 2006
    Posts
    1,469
    Mentioned
    10 Post(s)
    Tagged
    0 Thread(s)

    Re: Lua Help

    Just checked the hard drive and found the help file. Does not seem to work from with MMF however.

  7. #7
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleSWF Export ModuleUnicode Add-on
    Looki's Avatar
    Join Date
    Aug 2006
    Location
    Karlsruhe, Germany
    Posts
    3,741
    Mentioned
    5 Post(s)
    Tagged
    1 Thread(s)

    Re: Lua Help

    Strange, XLua should work fine
    It is the only object still in development, the other extensions have no developer support at all anymore. There's no cost and it has a lot of features that the other objects lack

  8. #8
    Clicker Fusion 2.5 DeveloperHTML5 Export Module

    Join Date
    Jun 2006
    Posts
    1,469
    Mentioned
    10 Post(s)
    Tagged
    0 Thread(s)

    Re: Lua Help

    I am using MMF2 Developer Ver2Build R251 on Windows 7. I installed the XLua extension from the ExtensionView program which worked fine.

    I create a new app and add XLua to the frame. I then click on HELP but no help pops up. I click on the website and I get

    Forbidden
    You don't have permission to access /xlua/ on this server.

    Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.

    I then manually go to the help folder in the Program Files area and I find the help file. I am able to run help from there but not within MMF2.

  9. #9
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleSWF Export ModuleUnicode Add-on
    Looki's Avatar
    Join Date
    Aug 2006
    Location
    Karlsruhe, Germany
    Posts
    3,741
    Mentioned
    5 Post(s)
    Tagged
    1 Thread(s)

    Re: Lua Help

    Oh, sorry, I thought the extension itself doesn't work. Not sure about the help file There also is an online documentation somewhere but I have no clue where.

  10. #10
    Clicker Fusion 2.5 DeveloperHTML5 Export Module

    Join Date
    Jun 2006
    Posts
    1,469
    Mentioned
    10 Post(s)
    Tagged
    0 Thread(s)

    Re: Lua Help

    I found some at http://www.taloncrossing.com/xlua/docs/

Page 1 of 2 1 2 LastLast

Posting Permissions

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