Author Topic: Axe Parser List issues  (Read 4742 times)

0 Members and 1 Guest are viewing this topic.

Offline waggyner

  • LV1 Newcomer (Next: 20)
  • *
  • Posts: 8
  • Rating: +0/-0
    • View Profile
Axe Parser List issues
« on: July 01, 2014, 01:04:48 pm »

I'm making an RPG like game game and I was thinking I could store the character stats as a list. I know I cannot use L1-L6 so I was just planning on making a custom list.
The problem is that axe says there is a token issue when compiling the code. I know I could use lists in basic but did axe change the way lists work?


In the code I had
{1,2,3}->LTEST
(that is the list L not a capital L)

Offline Hayleia

  • Programming Absol
  • Coder Of Tomorrow
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3367
  • Rating: +393/-7
    • View Profile
Re: Axe Parser List issues
« Reply #1 on: July 01, 2014, 01:13:32 pm »
Read the Commands.html. Lists don't exist in Axe.
However, pointers to RAM exist, and there are some RAM areas available. Some of those areas even have predefined pointers, such as... L1-L6.

The area pointed by L1 for example is 768 byte large. Probably enough for your uses. You can do 1→{L1+0} and 2→{L1+1} for example, or 512→{L1+0}r and 1024→{L1+2}r.
I own: 83+ ; 84+SE ; 76.fr ; CX CAS ; Prizm ; 84+CSE
Sorry if I answer with something that seems unrelated, English is not my primary language and I might not have understood well. Sorry if I make English mistakes too.

click here to know where you got your last +1s

Offline Runer112

  • Project Author
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2289
  • Rating: +639/-31
    • View Profile
Re: Axe Parser List issues
« Reply #2 on: July 01, 2014, 01:29:48 pm »
Read the Commands.html. Lists don't exist in Axe.

I'd actually recommend reading the Documentation.pdf file instead. The command list is full of great information if you know generally how the language works, but basic concepts like how to store and retrieve data are best learned from the base documentation.

But after you've read the Documentation.pdf file, skimming through the Commands.html file is definitely still a good idea.
« Last Edit: July 01, 2014, 01:31:31 pm by Runer112 »

Offline waggyner

  • LV1 Newcomer (Next: 20)
  • *
  • Posts: 8
  • Rating: +0/-0
    • View Profile
Re: Axe Parser List issues
« Reply #3 on: July 01, 2014, 02:13:59 pm »
such as... L1-L6.

The area pointed by L1 for example is 768 byte large. Probably enough for your uses. You can do 1→{L1+0} and 2→{L1+1} for example, or 512→{L1+0}r and 1024→{L1+2}r.


how would i check values later? for example checking the second position of L1?

Offline Sorunome

  • Fox Fox Fox Fox Fox Fox Fox!
  • Support Staff
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 7920
  • Rating: +374/-13
  • Derpy Hooves
    • View Profile
    • My website! (You might lose the game)
Re: Axe Parser List issues
« Reply #4 on: July 01, 2014, 02:15:25 pm »
{L1+1}
now you read one byte past L1

THE GAME
Also, check out my website
If OmnomIRC is screwed up, blame me!
Click here to give me an internet!

Offline waggyner

  • LV1 Newcomer (Next: 20)
  • *
  • Posts: 8
  • Rating: +0/-0
    • View Profile
Re: Axe Parser List issues
« Reply #5 on: July 01, 2014, 05:00:56 pm »
say i store 4 numbers to L1
1->{L1+0}
2->{L1+1}
3->{L1+2}
4->{L1+3}


and then said
if {L1+2}=3
do code


wouldn't the calculator return '34' because its starting at position 3 and continuing?


also would there be any problems when storing 2 digit numbers to L1?
25->{L1+1}

Offline MGOS

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 336
  • Rating: +95/-0
    • View Profile
Re: Axe Parser List issues
« Reply #6 on: July 01, 2014, 05:16:08 pm »
The curly bracket operator {addr} only returns the single byte at the address you want. Each element of the array ("list") is one byte large, so it can store numbers from 0 to 255.

Offline waggyner

  • LV1 Newcomer (Next: 20)
  • *
  • Posts: 8
  • Rating: +0/-0
    • View Profile
Re: Axe Parser List issues
« Reply #7 on: July 01, 2014, 05:28:55 pm »
The curly bracket operator {addr} only returns the single byte at the address you want. Each element of the array ("list") is one byte large, so it can store numbers from 0 to 255.


oh. thank you!