How to import Lua packages into Love?

2

I was looking at the example files of the moon (more specifically the iup), and the example dial.wlua caught my attention a lot ... I thought it would be interesting a game using this base, for time travel, and tried to import the package iuplua to main.lua (putting at the beginning of the code: require("iuplua") and require("iupluacontrols") ). Result:

In short: How can I import this and other packages from the moon to löve2D?

    
asked by anonymous 07.03.2014 / 04:57

1 answer

1

When you give require("iup") , the interpreter will look for the iup file in a series of directories, depending on the configuration of your module system . In your case, the places where LOVE searched for the iup appear in the error message. The simplest way to solve the problem would be to move the iup file to one of these directories.

    
07.03.2014 / 05:28