Forum

> > CS2D > Scripts > [SOLVED]attempt to call global 'tile'
Forums overviewCS2D overview Scripts overviewLog in to reply

English [SOLVED]attempt to call global 'tile'

1 reply
To the start Previous 1 Next To the start

old [SOLVED]attempt to call global 'tile'

_oops
User Off Offline

Quote
I'm working on in game map editor script now.
But i have problem with lua command cs2d lua cmd tile.
strangely, it works when i reset the script by using "dofile"
however when i restart the round, it doesn't work anymore unless reset the script again.

Whenever I trying to get original tile frame, it prints
1
LUA ERROR: sys/lua/Testscript.lua:1345: attempt to call global 'tile' (a number value)

ye , i'm using cs2d lua cmd reqcld to get mouse position.
and I tried to convert it into tonumber and tostring, but it was no use.

This is where error appeared.
1
2
3
4
elseif ( pl[id].MAP.ERASE == true ) then
local original = tile(pl[id].X,pl[id].Y,"originalframe") -- line 1345
parse("settile "..pl[id].X.." "..pl[id].Y.." "..original)
end

solved : I used x,y as variable in map script so it caused bug.
edited 1×, last 19.05.15 06:10:06 pm
To the start Previous 1 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview