User Tag List

Results 1 to 5 of 5

Thread: XLua's MMF Functions not working in a built application

  1. #1
    Clicker Multimedia Fusion 2

    Join Date
    Jun 2012
    Posts
    11
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    XLua's MMF Functions not working in a built application

    I'm having an issue where once I actually build my application, a lot of scripts involving XLua break (particularly, any references to functions within MMF2 events can't be called). These work fine when I run the application as a test from inside MMF2.

    I'd assume this is because of MMF2 not being able to locate the packages, but the .exe is in the same folder as the .mfa.

    The following is included at the start of the "auto" script:
    package.cpath = "./?.dll;./ext/?.dll"

    require "mmfi"
    but I get the impression I'm missing something really obvious.

    E: specifically, the error says "attempt to call upvalue 'MMFFunction' (a nil value)

  2. #2
    Clicker Multimedia Fusion 2SWF Export Module

    Join Date
    Sep 2006
    Posts
    1,544
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Try taking the actual mmfi.dll and putting it in the same folder as your project, or a subfolder.
    You should find mmfi.dll at your /multimedia fusion 2/dev/lib/mmfi.dll folder, along with any other prepackaged libraries

  3. #3
    Clicker Multimedia Fusion 2

    Join Date
    Jun 2012
    Posts
    11
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    It is there, nothing changes, which is why I'm baffled.

    My other guess would be that I'm doing something wrong with the MMF Functions themselves but I haven't figured out what.

  4. #4
    Clicker Multimedia Fusion 2

    Join Date
    Jun 2012
    Posts
    11
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Actually, it turns out that the script was confused every time I referred to an alterable value by its "MMF2 name" and not just mmf.ALT_A, etc.

    Most of the MMF functions seem to work fine now too so I'm not sure why it was breaking those?

  5. #5
    Clicker Multimedia Fusion 2SWF Export Module

    Join Date
    Sep 2006
    Posts
    1,544
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    When xlua encounters an error, it throws an error call and usually ceases to work from that point on, you expect everything else to fall apart unless you reset that instance. Some things might work, but those that depended on a failed script won't, its like that
    You would benefit greatly by putting a debug string object somewhere in your frame, and using this simple line of code. This way whenever lua throws an error, it will become visible and tell you what line that error occurred on
    You'll notice that if a script has syntax errors in it, it will throw an error when you try to load it


Similar Threads

  1. No sound in application when built!
    By kreeddem in forum Multimedia Fusion 2 - Technical Support
    Replies: 4
    Last Post: 24th March 2010, 12:59 AM
  2. MMF functions not working upon install
    By SilverForte in forum Multimedia Fusion 2 - Technical Support
    Replies: 5
    Last Post: 15th July 2009, 08:11 PM
  3. LiveReceiver not working in built app
    By xerus in forum Multimedia Fusion 2 - Technical Support
    Replies: 11
    Last Post: 20th May 2008, 10:11 PM
  4. List of in-built functions?
    By Blizna in forum The Games Factory 2 - Technical Support
    Replies: 3
    Last Post: 21st September 2007, 07:08 AM
  5. "Play Sound from File" Not working in Built App
    By ACESpark in forum Multimedia Fusion 2 - Technical Support
    Replies: 6
    Last Post: 28th February 2007, 11:23 PM

Posting Permissions

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