Darwinbots Forum
Bots and Simulations => DNA - General => Topic started by: MacadamiaNuts on January 09, 2008, 12:38:48 PM
-
I don't get it. I've got this code:
start
...
clearbool
*.waste 100 >
*.waste .shootval store
-4 .shoot store
clearbool
And the waste shoot executes always.
But if I use:
start
...
clearbool
*.waste 100 >
-4 .shoot store
*.waste .shootval store
clearbool
The condition works right. Why? I'm using 2.43y.
-
Perhaps the bot is aquiring waste every cycle. Perhaps it's a bug. I will need a sim to investigate.
-
Gimme some time. I'm trying to replicate it with a simpler bot, cos LF7 is nightmarish.
-
Nailed it. There was a duplicated store lower in the code, like:
*.waste 100 >
*.waste .shootval store
-4 .shoot store
clearbool
(properly coded stuff)
store
Without the clearbool between, nothing happened, but with the clearbool, the command was executed.