Forum

> > CS2D > Scripts > server lua error
Forums overviewCS2D overview Scripts overviewLog in to reply

English server lua error

4 replies
To the start Previous 1 Next To the start

old server lua error

deatclaws
User Off Offline

Quote
Hey guys it's me again whit my tibia script this time is not the monster lua that don't work NO this time is the f***g server.lua U_U ! so uhmm i will explain my problem ,,

when i run dedicated.exe to start my server ( normal thing )

i have that message .. =>


LUA ERROR: sys/lua/cs2dtibia/server.lua:32: bad argument #1 to 'ipairs' (table expected, got nil)

the line 28 to 40 from server.lua is ( i took 28-40 for more information about the part of the script ..) =>

for y = 0, map'ysize' do
     GROUNDITEMS[y], TILEZONE[y] = {}, {}
     for x = 0, map'xsize' do
          GROUNDITEMS[y][x], TILEZONE[y][x] = {}, {}
          for i, v in ipairs(SAFEZONE) do
               TILEZONE[y][x].SAFE = (x >= v[1][1] and x <= v[2][1] and y >= v[1][2] and y <= v[2][2])
               if TILEZONE[y][x].SAFE then
                    TILEZONE[y][x].NOPVP = true
                    TILEZONE[y][x].NOMONSTERS = true
                    TILEZONE[y][x].PVP = false
                    break
               end
          end


can someone help me whit this ?

old Re: server lua error

Informatixa
User Off Offline

Quote
Search the file config.lua
1
SAFEZONE = {}
** If you can not find the add at the end of the file

if it is in the file, make sure your values are recorded as
1
2
3
4
5
6
SAFEZONE = {
	{{0,0}, {1,1}},
	{{0,0}, {1,1}},
	{{0,0}, {1,1}},
	...
}
To the start Previous 1 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview