Forum

> > CS2D > Scripts > [SOLVED]attempt to call global 'tile'
ForenübersichtCS2D-Übersicht Scripts-ÜbersichtEinloggen, um zu antworten

Englisch [SOLVED]attempt to call global 'tile'

1 Antwort
Zum Anfang Vorherige 1 Nächste Zum Anfang

alt [SOLVED]attempt to call global 'tile'

_oops
User Off Offline

Zitieren
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.
1× editiert, zuletzt 19.05.15 18:10:06
Zum Anfang Vorherige 1 Nächste Zum Anfang
Einloggen, um zu antworten Scripts-ÜbersichtCS2D-ÜbersichtForenübersicht