Code center > Bugs and fixes

Weird DNA thing OPEN

(1/1)

Peksa:
It may have been present before, but I just noticed this:

--- Code: ---start
'You have some extra energy...
*.nrg 2000 >
'...and not so much poison!
dupbool
*.poison 300 < and
25 .mkpoison store
dropbool
'...and not quite enough body!
*.body 800 < and
  100 .strbody store

--- End code ---
Works like it is supposed to work, but...


--- Code: ---start
'You have some extra energy...
*.nrg 2000 >
'...and not so much poison!
dupbool
*.poison 300 < and
25 .mkpoison store
dropbool
'...and not quite enough body!
*.body 800 < and
  100 .strbody store

--- End code ---
...doesn't take notice of the second condition, and just produces poison until nrg is 2000 The empty spaces are made with tab (the button next to Q).

EricL:
Looks to be a bug in treating tabs as white space in the DNA parse routine.  For some reason, it manifests itself as changing the next boolean operator after the tab into a number, usually 0.  Take a peak at the tabbed DNA in the bot properties dialog to see the effect.

I'll get to it in the next drop in a couple weeks.

Navigation

[0] Message Index

Go to full version