AraeStore() modifiying the data value

AraeStore() modifiying the data value

Postby Downad » Thu Apr 04, 2019 4:51 pm

Hello,
i hope that this is the correct threat...
if i use the the AreaStore() in my mod, i can insert_area(edge1, edge2, data).
now i will change the data.
Is there an easy way to do something like
Code: Select all
change_area_data_by_id(id, new_data_string)


actuall i read all value and create an new area with the new values and remove tzhe old area.
Code: Select all
example:
local values = store:get_area(id, true,true)
values.data = "NEW DATA"
store:insert_area(value.pos1, value.pos2, value.data)
store:remove_area(id)

By this i get an 'nil' - error that must controled if i loop my areas
Code: Select all
while store:get_area(counter) do
...
counter = counter +1
end

this while - stops at my removed ID.
Downad
Member
 
Posts: 15
Joined: Tue Oct 03, 2017 8:54 am
GitHub: downad
In-game: downad



Return to Problems



Who is online

Users browsing this forum: Yandex Bot [Bot] and 0 guests