| FBA The Creator http://www.fbacreator.com/fbaforum/ |
|
| Problem with Indexation http://www.fbacreator.com/fbaforum/viewtopic.php?f=2&t=220 |
Page 1 of 1 |
| Author: | Root [ Sun Sep 27, 2009 4:44 pm ] |
| Post subject: | Problem with Indexation |
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() in debug window got this Code: >> Output Debug Console As we see Code: DEBUG: after 20:80 : or and in the end Code: DEBUG: after 20:80 : or 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. |
|
| Author: | evilmaio [ Mon Sep 28, 2009 7:29 am ] |
| Post subject: | Re: Problem with Indexation |
Root wrote: 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? Mmmh..no it looks like a bug..maybe I consider files only in ascii mode. Actually the only way to workaround this could be build an external dll. |
|
| Author: | Root [ Tue Sep 29, 2009 7:38 pm ] |
| Post subject: | Re: Problem with Indexation |
I guess you didn't understand what is the problem with indexation. simple description: script Value of x x={} _____ {nil} x[1]={1} __ {{1}} x[2]=x[1] _ {{1},{1}} x[2][1]=2 _ should be {{1},{2}} but it is {{2},{2}} x[1] somehow binding to x[2] in 3rd row |
|
| Author: | evilmaio [ Wed Sep 30, 2009 2:55 pm ] |
| Post subject: | Re: Problem with Indexation |
Root wrote: I guess you didn't understand what is the problem with indexation. simple description: script Value of x x={} _____ {nil} x[1]={1} __ {{1}} x[2]=x[1] _ {{1},{1}} x[2][1]=2 _ should be {{1},{2}} but it is {{2},{2}} x[1] somehow binding to x[2] in 3rd row Did you already read the LUA tables documentation? http://www.lua.org/pil/2.5.html Actually FBA is entirelly LUA based, so any script related questions should be covered in LUA docs. |
|
| Author: | napco [ Sun Oct 11, 2009 1:19 am ] |
| Post subject: | Re: Problem with Indexation |
When using the assignment operator with tables you don't pass a copy of the table, but its "address": Code: t1 = {1, 2, 3, 4}t2 isn't = {1, 2, 3, 4}, but it's a "pointer" to t1... |
|
| Author: | Root [ Sun Oct 25, 2009 7:35 pm ] |
| Post subject: | Re: Problem with Indexation |
Thank you. Sorry, little dumb question. I Just forgot about addresses and some other stuff. |
|
| Page 1 of 1 | All times are UTC |
| Powered by phpBB® Forum Software © phpBB Limited https://www.phpbb.com/ |
|