Author Topic: Need help. Programs with more than one line always return a TIOS Invalid dim err  (Read 4278 times)

0 Members and 1 Guest are viewing this topic.

Offline Broseph Radson

  • LV5 Advanced (Next: 300)
  • *****
  • Posts: 295
  • Rating: +20/-1
  • Its 0x1A4 somewhere
    • View Profile
Whenever i compile an axe program with more than one line of code (besides the name), when i run it, TIOS returns an invalid dimension error. Im doing everything right, but if theres more than one line of code, it doesnt work. It compiles fine, but it gets an error. ???

I have no extra libraries installed, im compiling it for no shell and running in from the homescreen using Asm(

This is my first time actually using axe since i havent been able to get the commands page until just now (Printer failure).

Im also using version 0.4.1 since ti connect is garbage and wont connect to my calc anymore unless its on my Grandma's laptop.

All im trying to do ATM is make a simple program that displays a key code when pressed.

Im assuming that this code *should* work:
Code: [Select]
.KEY
Repeat Ans
getkey(0)
If Ans
Disp Ans>Dec
Disp i     //imaginary
End
End

Or something of that nature.

EDIT: Im not very experienced with the language as you can probably tell.
« Last Edit: September 22, 2010, 10:14:11 am by Broseph Radson »

SirCmpwn

  • Guest
Don't use Ans, it's not what you think.  Axe will never store to Ans if you don't use →Ans.
Here is my keypress program:
Code: [Select]
.KEY
Repeat getKey→K=/=15  // =/= is not equal to, and you just have to remember that Clear is 15
If K
ClrHome
Disp K>Dec
End
End

Offline Broseph Radson

  • LV5 Advanced (Next: 300)
  • *****
  • Posts: 295
  • Rating: +20/-1
  • Its 0x1A4 somewhere
    • View Profile
Oh ok so Ans was causing that. Thanks :D

I should be going to my grandparents' house this thursday so ill get the current version on my calc.

Offline LordConiupiter

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 339
  • Rating: +3/-0
  • Just one of the thousands of Axe-fans...
    • View Profile
or maybe you should just install TiLP :P
« Last Edit: September 22, 2010, 05:31:09 pm by LordConiupiter »
everytime that I was down, you would always come around, and get my feedback on the ground. (modified part from 'Seasons in the sun')

No matter how many errors are bothering you, always try to stay rel-Axe!

The HoMM project will be resumed as soon Axe 1.0.0 will be released!
Projects:
Code: [Select]
HoMM:   [==--------]    Project 'resumed': I'm suffering overwhelming new ideas being popped up in my dreams :P
tiDE:   [----------]    Explored and understood the main part of the code: just started writing a Tokenizer.



password of the week: uvanapererubupa (Any pronunciation is the right one ;) )   :D click me, and you'll be raided :D

Offline Happybobjr

  • James Oldiges
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2325
  • Rating: +128/-20
  • Howdy :)
    • View Profile
Tilp????? what's that?!
it sounds great (aka. not ti-connect)
do you have to install drivers to the computer to use it?  If not, i could use it at school!.

plz give a link :D :D :D
School: East Central High School
 
Axe: 1.0.0
TI-84 +SE  ||| OS: 2.53 MP (patched) ||| Version: "M"
TI-Nspire    |||  Lent out, and never returned
____________________________________________________________

Offline LordConiupiter

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 339
  • Rating: +3/-0
  • Just one of the thousands of Axe-fans...
    • View Profile
TiLP Is a Linking Program :P
and here's your link.
and yes, you need drivers, and GTK+, because it's not only windows, but even for Linux and Mac
But since it's open source, you could write your own portable Windows version based on it :D
« Last Edit: September 22, 2010, 06:08:32 pm by LordConiupiter »
everytime that I was down, you would always come around, and get my feedback on the ground. (modified part from 'Seasons in the sun')

No matter how many errors are bothering you, always try to stay rel-Axe!

The HoMM project will be resumed as soon Axe 1.0.0 will be released!
Projects:
Code: [Select]
HoMM:   [==--------]    Project 'resumed': I'm suffering overwhelming new ideas being popped up in my dreams :P
tiDE:   [----------]    Explored and understood the main part of the code: just started writing a Tokenizer.



password of the week: uvanapererubupa (Any pronunciation is the right one ;) )   :D click me, and you'll be raided :D

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
or maybe you should just install TiLP :P
Maybe his parents won't allow him to install stuff on his computer :P . Maybe they even blocked USB ports. Also wouldn't it be hard to write his own portable version if he has no computer programming knowledge?

Offline Broseph Radson

  • LV5 Advanced (Next: 300)
  • *****
  • Posts: 295
  • Rating: +20/-1
  • Its 0x1A4 somewhere
    • View Profile
I'll try TiLP. TI-Connect is just a bad program IMO. Although the Mac version does have a program editor built in. For some reason they just left that feature out of the Windows version  :'(

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
Yeah it's not very good. As for the prgm editor, TI-Connect 1.5 had one but it was removed in 1.6, along with TI-Group Editor and various old features I liked from 1.2 and 1.3.

The only reason why I use it instead of TiLP is because I do not feel like messing around the whole 64-bit issue with drivers.

Offline Broseph Radson

  • LV5 Advanced (Next: 300)
  • *****
  • Posts: 295
  • Rating: +20/-1
  • Its 0x1A4 somewhere
    • View Profile
I have another question (again im not very experienced lol).

If i have a mouse cursor like this one:

Code: [Select]
0→A
0→B
Repeat getkey(54)
ClrDraw
Pt-On(A,B,Pic1
DispGraph
A+(getkey(3))-(getkey(2))→A
B+(getkey(1))-(getkey(4))→B
End

How would i test if the cursor is within a certain area? Ive tried compound conditionals like this:

Code: [Select]
10<A<15

And an If block with a long conditional:
Code: [Select]
If (A>10) and (A<15) and so on
And i dont like using nested control blocks unless its with loops.

This is for clicking buttons and whatnot by the way.

Offline Deep Toaster

  • So much to do, so much time, so little motivation
  • Administrator
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 8217
  • Rating: +758/-15
    • View Profile
    • ClrHome
10<A<15 would work almost the same way as in BASIC, meaning it would be read as
Code: (Axe) [Select]
(10<A)<15
and since 10<A gives either a 1 (true) or 0 (false), it'll always come out true.

And for that long conditional, remember there is no order of operations, so just do
Code: (Axe) [Select]
:If A>10 and (A<15 and (A≠12 and ( ... )))
and it should work.

EDIT: Actually, nested control blocks would be a good idea, because the way Axe works, a long If statement would be translated the same way anyway, and it's a lot easier to debug if you have them nested.
« Last Edit: September 23, 2010, 02:22:21 pm by Deep Thought »




Offline Broseph Radson

  • LV5 Advanced (Next: 300)
  • *****
  • Posts: 295
  • Rating: +20/-1
  • Its 0x1A4 somewhere
    • View Profile
Alright thanks :)

Im also finally able to get the latest Axe update so that should help a bit.