Hey it's Piguy and I have been programming with axe lately and have found it to be even easier than basic, but have run into a few errors that I can just not fix!!! The first one is it will not allow me to have more than one sprite on a screen at a time; say for example I used
:[FF818181818181FF]->pic1A
:[FF818182357811FF]->pic1B
:pt-change(44,48,pic1A
:pt-change(52,48,pic1B
As part of my code(there is more in between and around all that so YES the code works fine with only one sprite) it would crash my calc. If you need my full code or know anything about this please tell me!!! Also I could use some help on a pixel-collision detector so the player won't fall through blocks, any help with either of these would be greatly appreciated-piguy→
I cannot think of any reason why those lines would cause any issues. To debug this, I imagine that posting the full code, or at least more code, would be necessary to locate the problem.
Ok i will post the needed code here once I copy it

Code:
:.game
:[18183C5A5A182424]->Pic1A
:[81818181818181FF]->Pic1B
:[FF181818181818FF]->Pic1C
:DiagnosticOff
:ClrDraw
:For(A,0,95
:End
:44->X->Z:59->Y
:0->S
:Repeat getKey(15)
:sub(TM
:DispGraph
:sub(TM
:If getKey(2) and (X#doesnt equal#1
:X#minus#1->X
:End
:If getKey(3) and (X#doesnt equal#87
:X+1->X
:End
:If getKey(4) and (Y#doesnt equal#1
:Y#minus#1->Y
:End
:If getKey(1) and (Y#doent equal#56
:Y+1->Y
:End
:If getKey(54) and (S#doesnt equal1
:->S
:X->A:Y->B
:End
:If S
:B#minus#1->B#doesnt equal#-5->S
:End
:End
:Return
:Lbl TM
:Pt-Change(X,Y,Pic1A
:Pt-Change(0,56,Pic1B
:Pt-Change(8,56,Pic1B
:Pt-Change(16,56,Pic1C

*this would keep going in order to build the map*
So that's the code as of now, so if you can help please do so!!!Btw the# means a symbol or character that is only for calcs(minus sign doesn't equal etc.)(for some reason the P T in Pt-change( is a smiley face just ignore)
Edit* I changed the code to the one that causes your calculator to crash
ive spent all day trying to correct the error and yet i still can not figure out whats causing it to crash; if anyone knows where a good tutorial on axe sprites is located and/or has an example code i could look at for drawing sprites in axe it would really be appreciated as i have no idea what could possibly be causing it not to work,i have tried EVERYTHING!!!
Can you post a link to the source code or compiled program (8xp file)? If I could reproduce the error, I'm sure I could diagnose it and hopefully fix it.

EDIT: Or is what you pasted above the entire body of the program? If so I can just tokenize that into an 8xp program myself and try it, although in my glance at it before, I couldn't see anything that would cause a hang or crash.
Runer112 wrote:
Can you post a link to the source code or compiled program (8xp file)? If I could reproduce the error, I'm sure I could diagnose it and hopefully fix it.
I think it's the source in his post 2 above yours.
The code shown is all of the code except that the ptchange( keeps going, but that should not effect it in any way, to see the bug you must store a sprite as pic1C then have at least one
line of Pt-change( have pic1C instead of pic1B if done correctly your calculator should crash and clear ram:-(
I can't recreate a crash from the code you posted. It seems to work just as intended. Can you post the 8xp file for either the source or compiled program (both would be ideal) that causes issues?
Check out the code I just added the part that should make it crash to be sure you entered it correctly
Changing my copy of the program to use Pic1C like that still doesn't cause any issues for me. I think it would still be helpful if you could post either or both of the source and compiled programs that cause the crash in 8xp format as sent directly from your calculator.
I would but I'm not sure that that's allowed, I asked tifreak about that earlier today and he said not to post it since it has a bug:(
Piguy-3.14 wrote:
I would but I'm not sure that that's allowed, I asked tifreak about that earlier today and he said not to post it since it has a bug:(

Edit* when you run it does it display two different sprites not including the character?
can you make menu's in axe parser, I am currently trying to implement one into my game but do not see a way to do so, help?
Piguy-3.14 wrote:
can you make menu's in axe parser, I am currently trying to implement one into my game but do not see a way to do so, help?
Of course you can. See that screenshot for example:

But there is no command to do that, you have to do "everything" by yourself, which is not that bad considering how ugly menus produced by the Menu() command in Basic are.

Piguy-3.14 wrote:
I would but I'm not sure that that's allowed, I asked tifreak about that earlier today and he said not to post it since it has a bug:(
No one said that you had to upload it on Cemetech. You can put in on ZippyShare and post the link here. Or even better, join Omnimaga, which is the forum where Axe is born and where it is being updated (latest version is 1.2.1a) and which is a forum where you can attach files to your posts (as soon as you get enough posts to be seen as real intelligent human and not spambot nor heavy troll).
  
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
Page 1 of 1
» All times are UTC - 5 Hours
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

 

Advertisement