Loading Modules dynamically

Please let me know if you’ve found anything. Email me or reply here so we can help others that have this problem as well. Thanks!

Hi @arjay.yabut07,

I think I found one main issue. In your “card.lua” module, I’m seeing two places where you call “io.open()”, but it looks like you’re trying to directly open a file via its string name. This won’t work… you need to define the actual path where that file exists, using the “system.pathForFile()” API.

You’ve done that elsewhere in your project, just not in “card.lua”, so basically your conditional check for if “script” or “scriptFile” exists fails, and nothing inside the block executes.

See here:

https://docs.coronalabs.com/api/library/io/open.html

Let me know how it goes from here,

Brent

Thank you so much. I seemed to have overlooked that. I appreciate the help!