Hello there,
I have a problem with my code. Everything is ok when I do not have duplicate references.
When I do this it works:
Arabic_Words.new(2, 27, 2, 0, 1, 23, 2, 28, 3, nil, nil, nil, nil, nil, nil,"d", "m", "mf", ":", "md", "md", "m", "m", "f", nil, nil, nil, nil, nil, nil,"a", "s", "oun", ":", "a", "s", "a", "s", "ou", nil, nil, nil, nil, nil, nil), |
But when I do this it doesn't work:
Arabic_Words.new(2, 28, 3, 0, 1, 23, 2, 28, 3, nil, nil, nil, nil, nil, nil,"d", "m", "mf", ":", "md", "md", "m", "m", "f", nil, nil, nil, nil, nil, nil,"a", "s", "oun", ":", "a", "s", "a", "s", "ou", nil, nil, nil, nil, nil, nil), |
You can see that I have duplicate:
2, 28, 3, 0, 1, 23,
2, 28, 3On the screenshot, I can see that the first duplicate is not in the right position, it is drawn over! Please note that this is right to left but I don't know if that matters as this is only textures not real text!?
Some more info:
You can see that the textures have been moved over.
I simply loop through some tables and set the textures positions. I guess this is something to do with table references (index) but that shouldn't happen.
I cannot find where in my code the problem is, could somebody have a look when you have time?
Thank you in advance. Peace.
Comments
I have copied mobdebug to my project then clicked exclude from execution.
Then in my main at the top I have:
Does ZBS debug work only for the game loop?
Fragmenter - animated loop machine and IKONOMIKON - the memory game
Fragmenter - animated loop machine and IKONOMIKON - the memory game
We have debugger now in Gideros.
"What one programmer can do in one month, two programmers can do in two months." - Fred Brooks
“The more you do coding stuff, the better you get at it.” - Aristotle (322 BC)
Could you tell me what you think may be the cause of my bug? It happens only when I have duplicate so maybe that's an index thing in a table?
Fix option #1: create multiple sprites
. remove line 16 and assign arabletter to arabletters_list entry on line 17
. return Bitmap.new(xlf) on line 110
Fix option #2: create views of your sprites
. change line 110 to local v=Viewport.new() v:setContent(xlf) return v
Likes: MoKaLux
youpi
I used your fix number 2 and it works like a charm. Thank you very much for your kind help.
Likes: Apollo14, hgy29
PS: i won't touch zbs again!
Likes: MoKaLux, SinisterSoft
Dislikes: keszegh