Bots and Simulations > DNA - General
Stubborn conditional
(1/1)
MacadamiaNuts:
I don't get it. I've got this code:
--- Code: ---start
...
clearbool
*.waste 100 >
*.waste .shootval store
-4 .shoot store
clearbool
--- End code ---
And the waste shoot executes always.
But if I use:
--- Code: ---start
...
clearbool
*.waste 100 >
-4 .shoot store
*.waste .shootval store
clearbool
--- End code ---
The condition works right. Why? I'm using 2.43y.
EricL:
Perhaps the bot is aquiring waste every cycle. Perhaps it's a bug. I will need a sim to investigate.
MacadamiaNuts:
Gimme some time. I'm trying to replicate it with a simpler bot, cos LF7 is nightmarish.
MacadamiaNuts:
Nailed it. There was a duplicated store lower in the code, like:
--- Code: ---*.waste 100 >
*.waste .shootval store
-4 .shoot store
clearbool
(properly coded stuff)
store
--- End code ---
Without the clearbool between, nothing happened, but with the clearbool, the command was executed.
Navigation
[0] Message Index
Go to full version