618 & 619 .lua subdirectory error

Getting the following error when publishing with a lua file in a subdirectory on iOS.

<notice>: Lua Runtime Error: lua_pcall failed with status: 2, error message is: module 'math/MathExtend' not found:resource (math/MathExtend.lu) does not exist in archive<br>Sep 14 01:47:32 unknown UIKitApplication:com.myapp.MyApp[0x936a][1357] <notice>: no field package.preload['math/MathExtend']<br>Sep 14 01:47:32 unknown UIKitApplication:com.myapp.MyApp[0x936a][1357] <notice>: no file '/var/mobile/Applications/64C6DF6B-C74A-4402-821E-6E0A786FB872/MyApp/math/MathExtend.lua'
Mac/Win/iOS/Android: Add subdirectory support for Lua files. Limitations: Lua files cannot have a ‘.’ except as part of the “.lua” extension. Android files still cannot have resource files in subdirectories

http://developer.anscamobile.com/release/2011/618 [import]uid: 4596 topic_id: 15081 reply_id: 315081[/import]

did you check your uppercase/lowercase

require “MathExtent” is not the same as require “maxextend”

c
[import]uid: 24 topic_id: 15081 reply_id: 55901[/import]

@carlos

I’m not sure I follow. It works in the simulator.

It’s in the project directory as, “math/MathExtend.lua”

And then in main.lua:

require "math/MathExtend" [import]uid: 4596 topic_id: 15081 reply_id: 55929[/import]

require “math.MathExtned”

c [import]uid: 24 topic_id: 15081 reply_id: 55946[/import]

MathExtent, MaxExtend, MathExtned ; )

require "math.MathExtend" works in the simulator & iPad, thank you!

require "math/MathExtend"

Lucky for me i read this thread

I though before we should use

require "folder/module"

instead of using

require "folder.module"

Is the documentation has been added? [import]uid: 41267 topic_id: 15081 reply_id: 55967[/import]

I ran into this problem as well. The core issue is that I didn’t capitalize the filename.

-- In my code I had:  
require("bob")  
-- When it should have been:  
require("Bob")  
-- Because the actual file was named "Bob.lua" (initial caps)  

This freaked me out because the app ran properly in the simulator, but in Xcode and on the device, it failed.

Perhaps the Corona Simulator can *at least* issue a warning… since Apple’s Console reports the Lua error, I’m guessing that somewhere along the way Corona can flag this issue.

As a side note, the “Bob.lua” / require(“Bob”) line exists in many files throughout the app. In other words, perhaps Corona isn’t flagging the error because of the repeated calls to load/require this file, with a similar name? Anyway, just a thought.

UIKitApplication:com.ID.AppName[0x6d24]: Lua Runtime Error: lua\_pcall failed with status: 2, error message is: module 'bob' not found:resource (bob.lu) does not exist in archive [import]uid: 616 topic_id: 15081 reply_id: 81222[/import]