Lua Module

Hi guys,

I’m trying to create a module because I’m thinking this is the way to package my functions:

enemy.lua
---------------------------------- module(..., package.seeall) function newZombie() end

main.lua
---------------------------------- require "enemy" local zombie = enemy.newZombie()

When I run it, it says module not found. enemy.lua and main.lua are in the same directory. How do I fix this? Is this even the right approach to a cleaner and more manageable code?

Thanks! My apologies. This is my 1st day of coding lua.

Jon [import]uid: 3544 topic_id: 246 reply_id: 300246[/import]

Require is not working on the current version you have.

We actually do have a working version of Corona in house. Expect that within weeks.

Carlos. [import]uid: 24 topic_id: 246 reply_id: 309[/import]

Hello Carlos,

Is this still an issue? Does the release 1.0 not work as stated in the API docs when using modules?

Kind regards,

David [import]uid: 457 topic_id: 246 reply_id: 497[/import]

require is now working. yes. the sample code in the new 1.0 shows how to use require

Carlos [import]uid: 24 topic_id: 246 reply_id: 498[/import]