Greatings FBA TC users and developer
I have registred here much erlyer, but didn't have reason(like this one) to "say hello" until now.
For start I would like to say Thank YOU! for Fba, looks like you've spend a hell of a time to make such a great developing tool.
And now to the Bug.
I've made a script but ther was some problem, I find out that it's about Indexation.
It is extracted from program and placed to this demo sample. You can just put it to
Quote:
main.fba
, RUN and press right side of project window.
Code:
function onmainloop()
clear(0,0,127)
fillrect(0,0,screenwidth()/2,screenheight(),127,0,0)
print(50,120,"quit",0,127,127)
print(screenwidth()/2+50,120,"start",127,127,0)
if mousedown()==1 then
if mousein(0,0,screenwidth()/2,screenheight()) then
quit()
else
FillMatrix()
end
end
end
function FillMatrix()
pathx={}
for lx=0,100 do
pathx[lx]={}
for ly=0,100 do
pathx[lx][ly]={}
end
end
Progression(20,80)
end
function Progression(x,y)
CheckQuadrant(x-1, y ,x,y)
CheckQuadrant(x+1,y-1,x,y)
end
function CheckQuadrant(xin,yin,xor,yor) --<--<-- something rong at this function
pathx[xin][yin] = pathx[xor][yor] -- here
FullIndex("before "..xin..":"..yin.." : in ",pathx[xin][yin])
FullIndex("before "..xor..":"..yor.." : or ",pathx[xor][yor])
pathx[xin][yin][# pathx[xin][yin] + 1]=xor -- or here, or both
FullIndex("after "..xin..":"..yin.." : in ",pathx[xin][yin])
FullIndex("after "..xor..":"..yor.." : or ",pathx[xor][yor])
end
function FullIndex(text,lib)
debug(text)for num=1,# lib do debug(lib[num])end
end
in debug window got this
Code:
>> Output Debug Console
DEBUG: before 19:80 : in
DEBUG: before 20:80 : or
DEBUG: after 19:80 : in
DEBUG: 20
DEBUG: after 20:80 : or
DEBUG: 20
DEBUG: before 21:79 : in
DEBUG: 20
DEBUG: before 20:80 : or
DEBUG: 20
DEBUG: after 21:79 : in
DEBUG: 20
DEBUG: 20
DEBUG: after 20:80 : or
DEBUG: 20
DEBUG: 20
As we see
Code:
DEBUG: after 20:80 : or
DEBUG: 20
and in the end
Code:
DEBUG: after 20:80 : or
DEBUG: 20
DEBUG: 20
despite that original quadrant untouched
pathx[xor][yor]=={20,20}
but it should remain empty
HOW can it be?
Allso I found that wrighting 0 character to file imposible ( writefile(handle,string.char(0)) ), does it suppose to be like that or it's just a bug?
Thank you for any response.
P.S. Tomorow I'll try to post a small new function for Fba.
