Author Topic: Ugh. ERR: ARGUMENT.  (Read 7952 times)

0 Members and 2 Guests are viewing this topic.

Offline Raylin

  • Godslayer
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1392
  • Rating: +83/-25
  • I am a certifiable squirrel ninja.
    • View Profile
    • Ray M. Perry
Ugh. ERR: ARGUMENT.
« on: November 02, 2009, 04:40:44 pm »
So, I'm making my Shin Megami Tensei spin-off and I get to a road block.
Currently, I am making the Persona screen where you can see the status and skills of all the Persona you currently embody.
The enemy stats are stored in a complex list consisting of one complex number and one real integer.

Code: [Select]
{1.5+5.1i, 1 -> L1
L1(1->A
L1(2->D
For(X,1,5
DelVar B
If X=1
int(imag(Ai->B
If X=2
10fPart(imag(Ai->B
If X=3
int(imag(A->B
If X=4
10fPart(imag(A->B
7X+7(X>1)+7(X>3->C
Text(C,79,B
End

Apparently, the above code gives out an ERR: ARGUMENT.
Comments? Corrections? CURES, maybe?
Bug me about my book.

Sarah: TI-83 Plus Silver Edition [OS 1.19]
Cassie: TI-86 [OS 1.XX]
Elizabeth: TI-81 [OS 1.XX]
Jehuty: TI-83 Plus Silver Edition [OS 1.19]
Tesla: CASIO Prizm







Offline Builderboy

  • Physics Guru
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 5673
  • Rating: +613/-9
  • Would you kindly?
    • View Profile
Re: Ugh. ERR: ARGUMENT.
« Reply #1 on: November 02, 2009, 05:06:26 pm »
Hmmm, I can't can't get it to misbehave on my calculator...  Where are you getting the error?

Offline Raylin

  • Godslayer
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1392
  • Rating: +83/-25
  • I am a certifiable squirrel ninja.
    • View Profile
    • Ray M. Perry
Re: Ugh. ERR: ARGUMENT.
« Reply #2 on: November 02, 2009, 05:09:12 pm »
Oh, I forgot a part.
After the X=4 condition, type:

Code: [Select]
If X=5
D->B

It happens when this code is evaluated.
Bug me about my book.

Sarah: TI-83 Plus Silver Edition [OS 1.19]
Cassie: TI-86 [OS 1.XX]
Elizabeth: TI-81 [OS 1.XX]
Jehuty: TI-83 Plus Silver Edition [OS 1.19]
Tesla: CASIO Prizm







Offline Builderboy

  • Physics Guru
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 5673
  • Rating: +613/-9
  • Would you kindly?
    • View Profile
Re: Ugh. ERR: ARGUMENT.
« Reply #3 on: November 02, 2009, 05:26:46 pm »
Aha, well, since D is an imaginary number, it will throw an error if plugged into the Text( command.  Note that if there is a single imaginary number in a list, it turns the entire list into imaginary numbers, even if they have no imaginary part to them

The fix?  Throw an imag( in there at the right place.

Offline Raylin

  • Godslayer
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1392
  • Rating: +83/-25
  • I am a certifiable squirrel ninja.
    • View Profile
    • Ray M. Perry
Re: Ugh. ERR: ARGUMENT.
« Reply #4 on: November 02, 2009, 05:28:49 pm »
You, sir, are a lifesaver.
And, now we know.

TI-BASIC is a sneaky little devil.

EDIT: Also, do you know if making the entire If statement thing into a boolean algorithm will make the game faster or is it just a waste of time?
« Last Edit: November 02, 2009, 05:32:24 pm by ProphetsDementia »
Bug me about my book.

Sarah: TI-83 Plus Silver Edition [OS 1.19]
Cassie: TI-86 [OS 1.XX]
Elizabeth: TI-81 [OS 1.XX]
Jehuty: TI-83 Plus Silver Edition [OS 1.19]
Tesla: CASIO Prizm







Offline Raylin

  • Godslayer
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1392
  • Rating: +83/-25
  • I am a certifiable squirrel ninja.
    • View Profile
    • Ray M. Perry
Re: Ugh. ERR: ARGUMENT.
« Reply #5 on: November 02, 2009, 05:40:45 pm »
EDIT BUMP DOUBLE POST SORRY WANT PEOPLE TO SEE THIS EDIT NOT SPAM.
Bug me about my book.

Sarah: TI-83 Plus Silver Edition [OS 1.19]
Cassie: TI-86 [OS 1.XX]
Elizabeth: TI-81 [OS 1.XX]
Jehuty: TI-83 Plus Silver Edition [OS 1.19]
Tesla: CASIO Prizm







Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Ugh. ERR: ARGUMENT.
« Reply #6 on: November 02, 2009, 05:43:55 pm »
oh, actually, on Simplemachines/SMF forum system, if you edit your post and it's the very last post of a topic, this topic will be marked as unread. Else, what I sometimes do is copy my post, delete it then repost it with the edit. It bumps it up. Double posting is fine if there has been several hours between two posts, though

Offline Raylin

  • Godslayer
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1392
  • Rating: +83/-25
  • I am a certifiable squirrel ninja.
    • View Profile
    • Ray M. Perry
Re: Ugh. ERR: ARGUMENT.
« Reply #7 on: November 02, 2009, 05:44:55 pm »
Oh. Really?
Didn't know that.
Bug me about my book.

Sarah: TI-83 Plus Silver Edition [OS 1.19]
Cassie: TI-86 [OS 1.XX]
Elizabeth: TI-81 [OS 1.XX]
Jehuty: TI-83 Plus Silver Edition [OS 1.19]
Tesla: CASIO Prizm







Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Ugh. ERR: ARGUMENT.
« Reply #8 on: November 02, 2009, 05:45:53 pm »
Yeah I just discovered it like a few months ago, when Iambian edited one of his posts I alerady read

I think most people are going to dinner soon, though, including myself, so it will most likely take a while before someone notices the edit x.x

Offline Raylin

  • Godslayer
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1392
  • Rating: +83/-25
  • I am a certifiable squirrel ninja.
    • View Profile
    • Ray M. Perry
Re: Ugh. ERR: ARGUMENT.
« Reply #9 on: November 02, 2009, 05:47:36 pm »
Lol. All right then. Thanks in advance.
Bug me about my book.

Sarah: TI-83 Plus Silver Edition [OS 1.19]
Cassie: TI-86 [OS 1.XX]
Elizabeth: TI-81 [OS 1.XX]
Jehuty: TI-83 Plus Silver Edition [OS 1.19]
Tesla: CASIO Prizm







Offline Builderboy

  • Physics Guru
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 5673
  • Rating: +613/-9
  • Would you kindly?
    • View Profile
Re: Ugh. ERR: ARGUMENT.
« Reply #10 on: November 02, 2009, 06:46:04 pm »
I actually think Boolean statements would make this less memory efficient O.O for the If X=#, that has 5 bytes worth of info:

1:Newline
2:If
3:X
4:=
5:#

but if we were to combine this into a single line with Boolean expressions, not only would we now need to close most parenthesis, but the Boolean expression would take up equal space

(X=#) has 5 bytes as well, but in Boolean expression, you need to close all the parenthesis in each expression except the last

Offline Raylin

  • Godslayer
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1392
  • Rating: +83/-25
  • I am a certifiable squirrel ninja.
    • View Profile
    • Ray M. Perry
Re: Ugh. ERR: ARGUMENT.
« Reply #11 on: November 02, 2009, 06:50:15 pm »
But, is it FASTER?
Bug me about my book.

Sarah: TI-83 Plus Silver Edition [OS 1.19]
Cassie: TI-86 [OS 1.XX]
Elizabeth: TI-81 [OS 1.XX]
Jehuty: TI-83 Plus Silver Edition [OS 1.19]
Tesla: CASIO Prizm







Offline jsj795

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1105
  • Rating: +84/-3
    • View Profile
Re: Ugh. ERR: ARGUMENT.
« Reply #12 on: November 02, 2009, 08:28:17 pm »
I think it depends... If converting it into Boolean gets too wordy, it will actually drag them down. Sometimes, If statement is easier and sometimes faster... You just have to test them out through the speed indicator in the upper right hand corner... I usually go by the one where it takes less memory, hoping that it makes the program run faster :P


Spoiler For funny life mathematics:
1. ROMANCE MATHEMATICS
Smart man + smart woman = romance
Smart man + dumb woman = affair
Dumb man + smart woman = marriage
Dumb man + dumb woman = pregnancy
2. OFFICE ARITHMETIC
Smart boss + smart employee = profit
Smart boss + dumb employee = production
Dumb boss + smart employee = promotion
Dumb boss + dumb employee = overtime
3. SHOPPING MATH
A man will pay $2 for a $1 item he needs.
A woman will pay $1 for a $2 item that she doesn't need.
4. GENERAL EQUATIONS & STATISTICS
A woman worries about the future until she gets a husband.
A man never worries about the future until he gets a wife.
A successful man is one who makes more money than his wife can spend.
A successful woman is one who can find such a man.
5. HAPPINESS
To be happy with a man, you must understand him a lot and love him a little.
To be happy with a woman, you must love her a lot and not try to understand her at all.
6. LONGEVITY
Married men live longer than single men do, but married men are a lot more willing to die.
7. PROPENSITY TO CHANGE
A woman marries a man expecting he will change, but he doesn't.
A man marries a woman expecting that she won't change, and she does.
8. DISCUSSION TECHNIQUE
A woman has the last word in any argument.
Anything a man says after that is the beginning of a new argument.

Girls = Time * Money (Girls are a combination of time and money)
Time = Money (Time is money)
Girls = Money squared (So, girls are money squared)
Money = sqrt(Evil) (Money is also the root of all evil)
Girls = sqrt(Evil) squared (So, girls are the root of all evil squared)
Girls = Evil (Thus, girls are evil)
*Girls=Evil credit goes to Compynerd255*

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Ugh. ERR: ARGUMENT.
« Reply #13 on: November 02, 2009, 08:49:29 pm »
Of course it all depends if the programmer wants to optimize for size or for speed. I personally often go for the latter, unless the speed increase is not signifiant enough to justify a size increase

Offline Raylin

  • Godslayer
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1392
  • Rating: +83/-25
  • I am a certifiable squirrel ninja.
    • View Profile
    • Ray M. Perry
Re: Ugh. ERR: ARGUMENT.
« Reply #14 on: November 02, 2009, 08:50:41 pm »
Quote
layer

Do you mean, the 'latter'? :P
Bug me about my book.

Sarah: TI-83 Plus Silver Edition [OS 1.19]
Cassie: TI-86 [OS 1.XX]
Elizabeth: TI-81 [OS 1.XX]
Jehuty: TI-83 Plus Silver Edition [OS 1.19]
Tesla: CASIO Prizm