@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
And I don't even see any issues that was mentioned in the original post, it seems to work fine for me
I remember in some post it was mentioned that there were couple of issues with require:
1) it cached results, so its better not to use it if you requiring and deleting stuff
2) you could not require files in temp or documents folders
I know this probably does not apply here, but the solution mentioned was to use dofile or loadfile. Maybe it would work?
This looks like a problem which could happen to other users and it would be helpful if @atilim could replicate and fix it OR maybe change the TileMap examples supplied with GiderosStudio to use dofile instead require.
Website: http://www.castlegateinteractive.com
https://play.google.com/store/apps/developer?id=Castlegate+Interactive