Plugins not working (more specifically the paid version of math2d)?

Hi,

I just purchased the math2d plugin and it doesn’t seem to work.

I ran one of the samples and get the following error

math2d_04_lineLine/main.lua:57: attempt to call field ‘lineLineIntersect’ (a nil value)

When I run the sample I don’t get any message saying it is downloading/updating the plugin.

I tried adding another plugin and don’t see any message there either.

Corona Build: 2016.2992

Mac: Sierra 10.12.1

Thanks,

Craig

Did you update your build.settings file?

Checked,  but should not have to.  This is the sample from the math2d documentation site, so I assume it is good to go.  The other plugin I added synced,  just not math2d.

Cheers.

Craig

According to the docs for the plugin, you do have to. I don’t know to which plugin you refer that works without updating the build.settings file, but one would presume it was a free plugin.

To confirm, you have added the correct entry to the build.settings file for math2d, correct?

Yip,  sorry, should have been clearer.  When I said I shouldn’t have to, this is because it is already done in the sample.

Here is a snipped from my build.setting

[lua]

plugins =

{

– key is the name passed to Lua’s ‘require()’

[“plugin.math2d”] =

{

– required

publisherId = “com.roaminggamer”,

},

}

[/lua]

Cheers,

Craig

Hi,

I tried the app on a PC and it works perfectly.  On the Mac I am still getting the same error, however if I delete the existing plugins I then get the following message when I run the code.

Thanks,

Craig

Craig,

  1. I have reproduced the issue you are seeing by doing this:

A> Download the   math2d plugin tests:  http://github.com/roaminggamer/RG_FreeStuff/raw/master/AskEd/2016/11/math2d.zip

B> Run test: ~/math2d/tests/math2d_03_segmentCircle

On Windows this works.

On OS X (10.11 for me) this fails.

  1. I did this (ON OSX) to see what functions are attached to the plugin:

    local math2d = require( “plugin.math2d” ) for k,v in pairs( math2d ) do print(k,v) end

I see that all of the extra functions are missing which tells me it is downloading or using the Lua version.

  1.  Sorry for the frustration this is probably causing you.  I too am frustrated since this should not be occurring.

I am investigating.  It may take some time however.  Please hang tight.

Craig,

I found the problem.  For some reason, the .lua version is being used instead of the .dylib  version.

This is probably being caused by the fact that the original version of math2d was a Lua only library, but when I updated I moved to a binary version.  I don’t think many plugin developers have done this, so I got to uncover this issue on OS X.

TL;DR In short, if you previously used the Lua-only version of this plugin on OS X and then switch to the native (binary) version, the simulator will (wrongly) use the Lua version of the plugin instead.

Fix

  1. Open this folder on OS X: ~/Library/Application\ Support/Corona/Simulator/Plugins/plugin

  2. Remove the file: math2d.lua

  3. Try running now.

@all,

For anyone reading this.  This was a good question post , because it included lots of useful data.  

I do have one request however.  In the future, please be sure to put the ‘product name’ first in the title like this:

_ Math2D - Issue Summary_

Issue Body

By having Math2D as the first word I will see it when I browse recent issues.

I missed this post because it has a long title with math2d near the end.  However, due to its length the end gets trimmed off with

If it had used the requested format I’d have seen it sooner.  Still, thanks for the quality content of the post.

Cheers,

Ed

Started new thread here

Cheers Ed,

Originally thought the problem was bigger and impacting on other plugins, once I realized it was limited to math2d I did try to edit the title but couldn’t. 

Anyway.  Seemed to fix the problem in the simulator, however I have another issue (not sure if I should start another thread?).  When I install your samples (tried “math2d_01_basics” and “math2d_03_segmentCircle”) I get an error. ​

Corona SDK version: 2992

Mac: Sierra 10.12.1

Device: S7 (SM-930F)

Android Version: 6.0.1

Cheers,

Craig