Code center > Solved Bugs
Run-time error 6 overflow.
Testlund:
It's the number used in the dna that you mean, right?
For example I had these dna instructions for my alga:
cond
*.nrg 16000 > and
*.chlr 16000 <
start
16 .mkchlr store
stop
cond
*.nrg 16000 > and
*.chlr 15999 >
start
16 .strbody store
stop
cond
*.body 16000 >
start
50 .repro store
32 .aimdx store
stop
Now I've changed it to this and it has been running fine for about 1 and a half hour now:
cond
*.nrg 1000 > and
*.chlr 1000 <
start
8 .mkchlr store
stop
cond
*.nrg 1000 > and
*.chlr 999 >
start
8 .strbody store
stop
cond
*.body 1000 >
start
50 .repro store
32 .aimdx store
stop
Panda:
What happened is a number less than 0 was trying to be put into a memory location which caused an overflow. The check on the number of chloroplasts was making body 0, when chloroplasts were 0, rather than setting chloroplasts to 0.
Botsareus:
--- Quote ---Doesn't it do that because it's a store variable. We can't store to 16000 so it's set to not store anywhere? I replaced it with 160 and it turned to .vel
--- End quote ---
Correct, but if you reload this DNA it will "." as 0 .
There is a significant data loss when any extraneous value becomes 0. Junk DNA is happening for a reason...
Botsareus:
The cause of the "." error was the system was not modulating by 1000 before checking a parse condition. Any value such as 2000 or 13000 where failing.
Btw,
.vel is 200 not 160
;)
Botsareus:
Here it is,
I was also working on the following new DNA commands:
addstore
substore
multstore
divstore
ceilstore
floorstore
rndstore
sgnstore
absstore
sqrstore
negstore
anglecmp
unpow
depow
sin (multiplied by 32000)
cos
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version