Author Topic: Math stack issue  (Read 4049 times)

Offline AZPaul

  • Bot Builder
  • **
  • Posts: 76
    • View Profile
Math stack issue
« on: March 29, 2005, 01:03:43 PM »
I feel so [you](*&% [/you]incompetent.

How could something so [you]&*^%[/you] simple cause me so much [you]&^%&#@[/you] headache!

Eye values:  0 0 0 0 0 0 24 24 24

Gene:

'
'----- #21  Something to the right - turn
'
cond
  *.eye5 *.eye4 add *.eye6 add 0 =
  *.eye7 *.eye9 add *.eye1 sub *.eye3 sub 0 >
start
  100 .aimdx store
stop

Unless I have a totally bogus view of how the [you]&(*^^#[/you] math stack works both of these [you]&^$@@%*)[/you] conditionals should return me a [you]*&%$@[/you] "true."

So why the ever lovin [you]&^%$[/you] won't this stupid [you]%*&^[/you] gene fire?

No other genes executed during the cycle (but this one was supposed to, the [you]&^%$[/you] thing). So what the [you]*&^$@#*((&%[/you] is going on here?

Embarassingly yours,

-P

Offline PurpleYouko

  • Bot God
  • *****
  • Posts: 2556
    • View Profile
Math stack issue
« Reply #1 on: March 29, 2005, 01:25:30 PM »
Sorry to inform you of this but.......

[span style=\'font-size:14pt;line-height:100%\']MATH FUNCTIONS DON'T WORK IN CONDITIONS![/span]

Sorry  :)
« Last Edit: March 29, 2005, 01:25:57 PM by PurpleYouko »
There are 10 kinds of people in the world
Those who understand binary.
and those who don't

:D PY :D

Offline PurpleYouko

  • Bot God
  • *****
  • Posts: 2556
    • View Profile
Math stack issue
« Reply #2 on: March 29, 2005, 01:32:33 PM »
Try this

Code: [Select]
cond
start
*.eye5 *.eye4 add *.eye6 add 55 store
' stores result of condition into mem cell 55
*.eye7 *.eye9 add *.eye1 sub *.eye3 sub  56 store
' stores result of condition into mem cell 56
stop

cond
*55 0 =
*56 0 >
start
100 .aimdx store
stop

it will do  exactly the same thing that you were trying to acheive but by storing the results of your conditions into memory cells first then comparing memory value in the following gene.

Long winded ? maybe but definitely possible.
There are 10 kinds of people in the world
Those who understand binary.
and those who don't

:D PY :D

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
Math stack issue
« Reply #3 on: March 29, 2005, 01:57:37 PM »
I'm going to get on math in conditionals soon.  It's all part of my grand reaching Junk DNA/Chromosome idea that is probably at least as massive as the enzyme system, if not a bit simpler in the biological aspect.

Offline AZPaul

  • Bot Builder
  • **
  • Posts: 76
    • View Profile
Math stack issue
« Reply #4 on: March 29, 2005, 02:04:18 PM »
Quote
Sorry to inform you of this but.......

MATH FUNCTIONS DON'T WORK IN CONDITIONS!




 Say what? :shoot:

 :burnup:  :banghead:  :cuss:  :cuss:  :tantrum:  :shoot:  :bash:  :cuss:  :rant:  :pokey:  :bash:  :plzdie:  :shoot:
« Last Edit: March 29, 2005, 02:06:42 PM by AZPaul »

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
Math stack issue
« Reply #5 on: March 29, 2005, 02:53:09 PM »
yeah, I think Anonymous Guest Person was having a problem with that a while ago too.