Importing plugin sometimes fails in 1.6

  • I found in 1.6 is you import an unmodified plugin a second time it fails with the error:

    LUA: no reference to main function found for plugin Test

    The first time you either import via command line or via the import UI the plugin works, however if you import again without modifying the .lua file you get the above error.

    For example:

    XML Test.xml:

    <?xml version="1.0" encoding="UTF-8"?>
    <GMA3 DataVersion="">
        <Plugin Name="Test" Author="hoss" Version="">
            <ComponentLua Name="Test" FileName="Test.lua" />

    LUA Test.lua:

    local function Main()
       Printf("THIS IS A TEST")
    return Main

    Macro 1:

    Import Plugin 1 "Test.xml"

    Steps to reproduce:

    • Delete Plugin 1 make sure nothing in slot 1
    • Import Plugin 1 "Test.xml" or Call Macro 1 or via the UI; plugin is imported
    • Call Plugin 1 plugin is successfully run
    • Import Plugin 1 "Test.xml" import plugin a second time in any way
    • Call Plugin 1 Error

    The above will continue to fail until you either modify Test.lua or you Delete the plugin and try again. For example is sufficient to add any whitespace character (space, new line, tab).

    I thought that updating the modification date of the file with copy Test.lua+ (windows) or touch Test.lua(mac, have not tested) might have worked but on windows at least it seems you have to actually change the file.

    The same failure does not happen in 1.5 or previous.

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!