Quick Links: Download Gideros Studio | Gideros Documentation | Gideros community chat | DONATE
Problem with require — Gideros Forum

Problem with require

ScouserScouser Guru
edited March 2013 in General questions
@Atilim:

Looking at this thread I decided to see if I could help. I downloaded the project, loaded it into Gideros Studio and tried to run it. This is what I get:
tiled_map.lua:23: module 'maps/map01' not found:
	no field package.preload['maps/map01']
	no file 'C:\Program Files (x86)\Lua\5.1\lua\maps/map01.luac'
	no file '.\maps/map01.dll'
	no file 'C:\Program Files (x86)\Gideros\maps/map01.dll'
	no file 'C:\Program Files (x86)\Gideros\loadall.dll'
stack traceback:
It works perfectly fine on Windows XP. This machine is running Windows 7 Professional 64bit and I'm a bit puzzled as to why it cannot see the map file. Maybe you could shed some light on it.

The offending line is the map = require(filename) line in the following function
function TiledMap:init(filename)
 
	local directory = "."
 
	if string.find(filename, "/") then
		directory = string.gsub(filename, "/%w*$", "")
	end
 
	local map = require(filename)	-- Error occurs here
 
	.....
 
end

Comments

Sign In or Register to comment.