Author Topic: Error: Arguments on abs()?  (Read 5699 times)

0 Members and 1 Guest are viewing this topic.

Offline InternetCliche

  • LV2 Member (Next: 40)
  • **
  • Posts: 28
  • Rating: +0/-0
  • Sometimes, things happen. With explosions.
    • View Profile
Error: Arguments on abs()?
« on: November 15, 2011, 05:18:33 pm »
The following line of code produces the error WRONG # OF ARGS, highlighting the end bracket of {GDB1+R}
Code: [Select]
If abs(A+r1-{GDB1+R})<8 and (abs(B+r2-{GDB2+R})<8)Any ideas? And there is no subroutine named R, I checked for that.
Sometimes, things happen. With explosions.

Especially with explosions.

Offline saintrunner

  • Custom Spriter: You ask it! I'll Make it!
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1787
  • Rating: +115/-11
  • Flogging Molly
    • View Profile
    • Jonny K Music
Re: Error: Arguments on abs()?
« Reply #1 on: November 15, 2011, 05:21:26 pm »
get rid of the ( before the second abs(, that might be it

actually just add a ( before the first abs( and after the first <8
« Last Edit: November 15, 2011, 05:23:22 pm by saintrunner »
My Sprites Thread   :Updated often :) for your viewing pleasure

GAMES:

Offline InternetCliche

  • LV2 Member (Next: 40)
  • **
  • Posts: 28
  • Rating: +0/-0
  • Sometimes, things happen. With explosions.
    • View Profile
Re: Error: Arguments on abs()?
« Reply #2 on: November 15, 2011, 05:22:37 pm »
get rid of the ( before the second abs(, that might be it
Nope. Doesn't compile, and if it did the logic would be wrong. Is this a bug with Axe?
Sometimes, things happen. With explosions.

Especially with explosions.

Offline saintrunner

  • Custom Spriter: You ask it! I'll Make it!
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1787
  • Rating: +115/-11
  • Flogging Molly
    • View Profile
    • Jonny K Music
Re: Error: Arguments on abs()?
« Reply #3 on: November 15, 2011, 05:24:33 pm »
nope, try

:If (abs(A+r1-{GDB1+R})< 8 ) and (abs(B+r2-{GDB2+R})< 8 )

or

:If (abs(A+r1-{GDB1+R})<8 and abs(B+r2-{GDB2+R})< 8 )

or


:If abs(A+r1-{GDB1+R})<8 and abs(B+r2-{GDB2+R})< 8


« Last Edit: November 15, 2011, 05:24:53 pm by saintrunner »
My Sprites Thread   :Updated often :) for your viewing pleasure

GAMES:

Offline InternetCliche

  • LV2 Member (Next: 40)
  • **
  • Posts: 28
  • Rating: +0/-0
  • Sometimes, things happen. With explosions.
    • View Profile
Re: Error: Arguments on abs()?
« Reply #4 on: November 15, 2011, 05:27:54 pm »
nope, try

:If (abs(A+r1-{GDB1+R})< 8 ) and (abs(B+r2-{GDB2+R})< 8 )
or
:If (abs(A+r1-{GDB1+R})<8 and abs(B+r2-{GDB2+R})< 8 )
or
:If abs(A+r1-{GDB1+R})<8 and abs(B+r2-{GDB2+R})< 8
None of them work. Still highlights that end bracket of {GDB1+R}.
Sometimes, things happen. With explosions.

Especially with explosions.

Offline saintrunner

  • Custom Spriter: You ask it! I'll Make it!
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1787
  • Rating: +115/-11
  • Flogging Molly
    • View Profile
    • Jonny K Music
Re: Error: Arguments on abs()?
« Reply #5 on: November 15, 2011, 05:29:50 pm »
hmm, usually its a parenthesis issue, at least with me. What do you have set as R?
 
My Sprites Thread   :Updated often :) for your viewing pleasure

GAMES:

Offline InternetCliche

  • LV2 Member (Next: 40)
  • **
  • Posts: 28
  • Rating: +0/-0
  • Sometimes, things happen. With explosions.
    • View Profile
Re: Error: Arguments on abs()?
« Reply #6 on: November 15, 2011, 05:31:39 pm »
 
hmm, usually its a parenthesis issue, at least with me. What do you have set as R?
R is
:For(R,0,2
Sometimes, things happen. With explosions.

Especially with explosions.

Offline AngelFish

  • Is this my custom title?
  • Administrator
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3242
  • Rating: +270/-27
  • I'm a Fishbot
    • View Profile
Re: Error: Arguments on abs()?
« Reply #7 on: November 15, 2011, 05:35:18 pm »
Um... is Abs() even an Axe token? It doesn't seem to do anything for me and it's not listed in the command index, although it compiles.
∂²Ψ    -(2m(V(x)-E)Ψ
---  = -------------
∂x²        ℏ²Ψ

Offline saintrunner

  • Custom Spriter: You ask it! I'll Make it!
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1787
  • Rating: +115/-11
  • Flogging Molly
    • View Profile
    • Jonny K Music
Re: Error: Arguments on abs()?
« Reply #8 on: November 15, 2011, 05:36:37 pm »
hmmm, I got nothing, sorry, but I doubt it's a problem with axe.

@too tired to think
My Sprites Thread   :Updated often :) for your viewing pleasure

GAMES:

Offline BalancedFury

  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 722
  • Rating: +29/-2
    • View Profile
Re: Error: Arguments on abs()?
« Reply #9 on: November 15, 2011, 05:36:41 pm »
Hi BTW since I didnt get to say so :D
Like saintrunner said, it usually is a parenthesis problem with me as well :P
Antonio Nam = DualBLDR = Tony Arthur... U choose!





JOIN THE PETITION TO ADD THIS EMOTICON!!
[|:{P ------->


Yo dawg I herd u lost the game game so I coded the game game in your calc so you can lose the game game while you code your code about losing the game game.

Offline saintrunner

  • Custom Spriter: You ask it! I'll Make it!
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1787
  • Rating: +115/-11
  • Flogging Molly
    • View Profile
    • Jonny K Music
Re: Error: Arguments on abs()?
« Reply #10 on: November 15, 2011, 05:37:39 pm »
Yeah It might just not be an option. Have you used it before and had it work?
My Sprites Thread   :Updated often :) for your viewing pleasure

GAMES:

Offline InternetCliche

  • LV2 Member (Next: 40)
  • **
  • Posts: 28
  • Rating: +0/-0
  • Sometimes, things happen. With explosions.
    • View Profile
Re: Error: Arguments on abs()?
« Reply #11 on: November 15, 2011, 05:37:41 pm »
Um... is Abs() even an Axe token? It doesn't seem to do anything for me and it's not listed in the command index, although it compiles.
It is in the basic math section. Ctrl-F it.
Sometimes, things happen. With explosions.

Especially with explosions.

Offline FinaleTI

  • Believe in the pony that believes in you!
  • CoT Emeritus
  • LV10 31337 u53r (Next: 2000)
  • *
  • Posts: 1830
  • Rating: +121/-2
  • Believe in the pony that believes in you!
    • View Profile
    • dmuckerman.tumblr.com
Re: Error: Arguments on abs()?
« Reply #12 on: November 15, 2011, 05:37:57 pm »
Um... is Abs() even an Axe token? It doesn't seem to do anything for me and it's not listed in the command index, although it compiles.
I just checked the 1.0.5 command list, and abs() is valid.


{CONST} or {CONST + Var} produces a 'Wrong # of Args' error D:
Thanks, I just caught that.  A workaround for now is to just add the constant after the variable: Var + CONST, which is more optimized anyway.
This could have something to do with the issue.
Try {R+GDB1} and {R+GDB2} instead and see if that works.


Spoiler For Projects:

My projects haven't been worked on in a while, so they're all on hiatus for the time being. I do hope to eventually return to them in some form or another...

Spoiler For Pokemon TI:
Axe port of Pokemon Red/Blue to the 83+/84+ family. On hold.

Spoiler For Nostalgia:
My big personal project, an original RPG about dimensional travel and a few heroes tasked with saving the world.
Coding-wise, on hold, but I am re-working the story.

Spoiler For Finale's Super Insane Tunnel Pack of Doom:
I will be combining Blur and Collision Course into a single gamepack. On hold.

Spoiler For Nostalgia Origins: Sky's Story:
Prequel to Nostalgia. On hold, especially while the story is re-worked.

Offline InternetCliche

  • LV2 Member (Next: 40)
  • **
  • Posts: 28
  • Rating: +0/-0
  • Sometimes, things happen. With explosions.
    • View Profile
Re: Error: Arguments on abs()?
« Reply #13 on: November 15, 2011, 05:41:15 pm »
Um... is Abs() even an Axe token? It doesn't seem to do anything for me and it's not listed in the command index, although it compiles.
I just checked the 1.0.5 command list, and abs() is valid.


{CONST} or {CONST + Var} produces a 'Wrong # of Args' error D:
Thanks, I just caught that.  A workaround for now is to just add the constant after the variable: Var + CONST, which is more optimized anyway.
This could have something to do with the issue.
Try {R+GDB1} and {R+GDB2} instead and see if that works.

Ah. Thanks-a-plenty. Compiles fine now. Wonder why it doesn't complain about the 37 other instances of {GDBX+somevar}. Not even the other one on the same line.
Sometimes, things happen. With explosions.

Especially with explosions.

Offline AngelFish

  • Is this my custom title?
  • Administrator
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3242
  • Rating: +270/-27
  • I'm a Fishbot
    • View Profile
Re: Error: Arguments on abs()?
« Reply #14 on: November 15, 2011, 05:41:39 pm »
Um... is Abs() even an Axe token? It doesn't seem to do anything for me and it's not listed in the command index, although it compiles.
I just checked the 1.0.5 command list, and abs() is valid.

Hm, Firefox is just failing at finding text in pages :/
∂²Ψ    -(2m(V(x)-E)Ψ
---  = -------------
∂x²        ℏ²Ψ