Omnimaga

Calculator Community => TI Calculators => Axe => Topic started by: InternetCliche on November 15, 2011, 05:18:33 pm

Title: Error: Arguments on abs()?
Post by: InternetCliche 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.
Title: Re: Error: Arguments on abs()?
Post by: saintrunner 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
Title: Re: Error: Arguments on abs()?
Post by: InternetCliche 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?
Title: Re: Error: Arguments on abs()?
Post by: saintrunner 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


Title: Re: Error: Arguments on abs()?
Post by: InternetCliche 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}.
Title: Re: Error: Arguments on abs()?
Post by: saintrunner 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?
 
Title: Re: Error: Arguments on abs()?
Post by: InternetCliche 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
Title: Re: Error: Arguments on abs()?
Post by: AngelFish 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.
Title: Re: Error: Arguments on abs()?
Post by: saintrunner 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
Title: Re: Error: Arguments on abs()?
Post by: BalancedFury 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
Title: Re: Error: Arguments on abs()?
Post by: saintrunner 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?
Title: Re: Error: Arguments on abs()?
Post by: InternetCliche 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.
Title: Re: Error: Arguments on abs()?
Post by: FinaleTI 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.
Title: Re: Error: Arguments on abs()?
Post by: InternetCliche 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.
Title: Re: Error: Arguments on abs()?
Post by: AngelFish 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 :/
Title: Re: Error: Arguments on abs()?
Post by: InternetCliche on November 15, 2011, 05:42:38 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 :/
Well, the problem was solved, but I am using firefox as well. Never updated past 3.6 though.
Title: Re: Error: Arguments on abs()?
Post by: DJ Omnimaga on November 15, 2011, 05:43:38 pm
Yeah I remember having troubles finding stuff with parhenteses in it before. At least it's not as bad as Wordpad when searching through PHP, though.
Title: Re: Error: Arguments on abs()?
Post by: InternetCliche on November 15, 2011, 05:45:10 pm
Yeah I remember having troubles finding stuff with parhenteses in it before. At least it's not as bad as Wordpad when searching through PHP, though.
Wordpad? Real men use notepad with the TF2 font.