odd. What version DBPro are you using? I'll look into it.
edit:
How about this:
sync on : sync rate 60
set display mode 800,600,32
print "Loading..."
amount=60
enemies=8
dim nodes(amount,amount)
dim enodes(amount,amount,enemies)
dim node_movex(9)
dim node_movez(9)
`N=1, Ne=2, E=3, Se=4, S=5, Sw=6, W=7, Nw=8
node_movex(1)=0 : node_movez(1)=0
node_movex(1)=0 : node_movez(1)=1
node_movex(2)=1 : node_movez(2)=1
node_movex(3)=1 : node_movez(3)=0
node_movex(4)=1 : node_movez(4)=-1
node_movex(5)=0 : node_movez(5)=-1
node_movex(6)=-1 : node_movez(6)=-1
node_movex(7)=-1 : node_movez(7)=0
node_movex(8)=-1 : node_movez(8)=1
clear_nodes(amount)
random_nodes(amount)
nodes(1,1)=0
nodes(2,1)=0
nodes(3,1)=0
nodes(4,1)=0
nodes(5,1)=0
nodes(6,1)=0
for h=0 to (enemies-1)
for i=0 to (amount-1)
for j=0 to (amount-1)
enodes(i,j,h)=nodes(i,j)
next j
next i
next h
dim chk_x(enemies)
dim chk_z(enemies)
dim epx#(enemies)
dim epz#(enemies)
dim oepx#(enemies)
dim oepz#(enemies)
dim chk_d(enemies)
for i=0 to enemies-1
chk_x(i)=rnd(amount-3)
chk_z(i)=rnd(amount-3)
epx#(i)=chk_x(i)*25
epz#(i)=chk_z(i)*25
next i
make matrix 1,(amount*25),(amount*25),25,25
for z=0 to amount-1
for x=0 to amount-1
if nodes(x,z)=-1
inc obj,1
if object exist(obj) then delete object obj
make object cube obj,25
position object obj,x*25,12,z*25
endif
next x
next z
for x=0 to (enemies-1)
eclean_nodes(amount,x)
next x
if startup=0
dest_x=rnd(amount-4)+2
dest_z=rnd(amount-4)+2
while nodes(dest_x,dest_z)<>0
dest_x=rnd(amount-4)+2
dest_z=rnd(amount-4)+2
endwhile
endif
for m=1 to enemies-1
enodes(dest_x,dest_z,m)=10
xs=dest_x
xe=dest_x
zs=dest_z
ze=dest_z
while safe_node(chk_x(m),chk_z(m),amount,m)=0
inc xe,1 : inc ze,1
dec xs,1 : dec zs,1
if xs<1 then xs=1
if zs<1 then zs=1
if xs>126 then xs=amount-2
if zs>126 then zs=amount-2
if xe<1 then xe=1
if ze<1 then ze=1
if xe>126 then xe=amount-2
if ze>126 then ze=amount-2
for xx=xs to xe
for zz=zs to ze
if enodes(xx,zz,m)=0
for compass=1 to 8
if safe_node(node_movex(compass)+xx,node_movez(compass)+zz,amount,m)>0 and node_movez(compass)>-1 then enodes(xx,zz,m)=compass
next compass
endif
next zz
next xx
for zz=ze to zs step -1
for xx=xe to xs step -1
if enodes(xx,zz,m)=0
for compass=1 to 8
if safe_node(node_movex(compass)+xx,node_movez(compass)+zz,amount,m)>0 and node_movex(compass)<1 then enodes(xx,zz,m)=compass
next compass
endif
next xx
next zz
endwhile
next m
odest_x = dest_x
odest_z = dest_z
px#=dest_x*25
pz#=dest_z*25
t=0
for i=0 to enemies-1
make object cube 50000+i,25
color object 50000+i,rgb(255,0,0)
next i
make object cube 49999,20
color object 49999,rgb(0,255,0)
ink rgb(255,0,0),0
do
opx#=px#
opz#=pz#
text 0,550,str$(screen fps())
for l=0 to enemies-1
oepx#(l)=epx#(l)
oepz#(l)=epz#(l)
chk_d(l)=safe_node(chk_x(l),chk_z(l),amount,l)
if (epx#(l)<px#+60) and (epx#(l)>px#-60) and (epz#(l)<pz#+60) and (epz#(l)>pz#-60)
if (px#)<epx#(l) then dec epx#(l),5
if (px#)>epx#(l) then inc epx#(l),5
if (pz#)<epz#(l) then dec epz#(l),5
if (pz#)>epz#(l) then inc epz#(l),5
else
if chk_d(l)>0 and chk_d(l)<10
if chk_x(l)=int(epx#(l)/25) and chk_z(l)=int(epz#(l)/25)
chk_x(l)=chk_x(l)+node_movex(chk_d(l))
chk_z(l)=chk_z(l)+node_movez(chk_d(l))
endif
if (chk_x(l)*25)<epx#(l) then dec epx#(l),6
if (chk_x(l)*25)>epx#(l) then inc epx#(l),6
if (chk_z(l)*25)<epz#(l) then dec epz#(l),6
if (chk_z(l)*25)>epz#(l) then inc epz#(l),6
else
eclean_nodes(amount,l)
enodes(dest_x,dest_z,l)=10
xs=dest_x
xe=dest_x
zs=dest_z
ze=dest_z
while safe_node(chk_x(l),chk_z(l),amount,l)=0
inc xe,1 : inc ze,1
dec xs,1 : dec zs,1
if xs<1 then xs=1
if zs<1 then zs=1
if xs>126 then xs=amount-2
if zs>126 then zs=amount-2
if xe<1 then xe=1
if ze<1 then ze=1
if xe>126 then xe=amount-2
if ze>126 then ze=amount-2
for xx=xs to xe
for zz=zs to ze
if enodes(xx,zz,l)=0
for compass=1 to 8
if safe_node(node_movex(compass)+xx,node_movez(compass)+zz,amount,l)>0 and node_movez(compass)>-1 then enodes(xx,zz,l)=compass
next compass
endif
next zz
next xx
for zz=ze to zs step -1
for xx=xe to xs step -1
if enodes(xx,zz,l)=0
for compass=1 to 8
if safe_node(node_movex(compass)+xx,node_movez(compass)+zz,amount,l)>0 and node_movex(compass)<1 then enodes(xx,zz,l)=compass
next compass
endif
next xx
next zz
endwhile
endif
endif
ink rgb(255,0,0),0
box chk_x(l)*4,chk_z(l)*4,(chk_x(l)*4)+3,(chk_z(l)*4)+3
if nodes(int(epx#(l)/25),int(oepz#(l)/25))=-1 then epx#(l)=oepx#(l)
if nodes(int(oepx#(l)/25),int(epz#(l)/25))=-1 then epz#(l)=oepz#(l)
position object 50000+l,epx#(l)-12,12,epz#(l)-12
next l
ink rgb(0,255,0),0
line dest_x*4,dest_z*4,(dest_x*4)+3,(dest_z*4)+3
line (dest_x*4)+3,dest_z*4,dest_x*4,(dest_z*4)+3
position camera (px#),500,(pz#)+500
point camera px#,12,pz#
inc pz#,(downkey()-upkey())*5
inc px#,(leftkey()-rightkey())*5
if nodes(int(px#/25),int(opz#/25))=-1 then px#=opx#
if nodes(int(opx#/25),int(pz#/25))=-1 then pz#=opz#
dest_x=px#/25
dest_z=pz#/25
position object 49999,px#-12,12,pz#-12
fastsync
loop
function clear_nodes(amount)
for zz=0 to amount-1
for xx=0 to amount-1
nodes(xx,zz)=0
next xx
next zz
endfunction
function clean_nodes(amount)
for zz=0 to amount-1
for xx=0 to amount-1
if nodes(xx,zz)>0 then nodes(xx,zz)=0
next xx
next zz
endfunction
function eclean_nodes(amount,e)
for zz=0 to amount-1
for xx=0 to amount-1
if enodes(xx,zz,e)>0 then enodes(xx,zz,e)=0
next xx
next zz
endfunction
function random_nodes(amount)
for zz=0 to (amount-1)
for xx=0 to (amount-1)
if xx=0 or zz=0 or xx=(amount-1) or zz=(amount-1) or rnd(20)=1
nodes(xx,zz)=-1
endif
next xx
next zz
for zz=2 to (amount-3)
for xx=2 to (amount-3)
if nodes(xx,zz)=0 and nodes(xx+1,zz)=-1 and nodes(xx,zz+1)=-1 then nodes(xx,zz)=-1
if nodes(xx,zz)=0 and nodes(xx-1,zz)=-1 and nodes(xx,zz+1)=-1 then nodes(xx,zz)=-1
if nodes(xx,zz)=0 and nodes(xx+1,zz)=-1 and nodes(xx,zz-1)=-1 then nodes(xx,zz)=-1
if nodes(xx,zz)=0 and nodes(xx-1,zz)=-1 and nodes(xx,zz-1)=-1 then nodes(xx,zz)=-1
next xx
next zz
endfunction
function safe_node(xx,zz,amount,e)
safenode=-1
if xx<amount and zz<amount and xx>-1 and zz>-1 then safenode=enodes(xx,zz,e)
endfunction safenode
BTW, anyone else recieve this error?
Chibi?