KermMartian wrote:
Spenceboy98 wrote:
Error:

Code:
:579: unexpected symbol near '/'


New code: http://pastebin.com/2YK6sTfU
No no, // is a comment in C. That was a comment to you; it wasn't supposed to be part of the code. Razz


Kerm, why do you confuse me?! Razz You told me to, so I did. Now I am confused, and I don't know what code to put where.
With the old code put this before line 578:


Code:

 else
    [put your variable reset code here]
flyingfisch wrote:
With the old code put this before line 578:


Code:

 else
    [put your variable reset code here]


Now, as soon as it starts up, it freezes and I have to reset my calculator. Sad I don't know what's wrong...
hmm, weird. luazm shouldn't freeze.
Okay, now I'm confused. I took out that bit of code you told me to put in, and now it is freezing every time I try to run it. What's wrong?
Can you exit with AC/on?

And can you show me what your code looks like?
flyingfisch wrote:
Can you exit with AC/on?

And can you show me what your code looks like?


I fixed this problem. Sorry for not updating. It was my

Code:
key = zmg.keyMenuFast()


Now I'm just trying to figure out the deathscreen thing. It should just restart the level completely, blockpos and all, but all it is doing is making the block disappear. Here is current code: http://pastebin.com/yjppEmwA

Edit: Newest code: http://pastebin.com/YTpzhx89

Edit 2:
I've got pretty much everything done right now(except the deatchscreen). If you can help in any way, here is the code:
http://pastebin.com/wwM28kek
Well, for starters, you have extraneous do-nothing code:
Code:
        if done then
        end

The code between current 579 and 597 looks fine, though; what's it currently doing wrong?
KermMartian wrote:
Well, for starters, you have extraneous do-nothing code:
Code:
        if done then
        end

The code between current 579 and 597 looks fine, though; what's it currently doing wrong?


Well, the block moves freely out of bounds. I don't really know what's wrong with it.
Has it always done that, or only recently? I can't see anything that would suggest lines 591-596 would not trigger in that case.

By the way, you can probably speed this up by taking lines 229-235 (zmg.clear(), repeat, ... end) and moving them to right before line 629 (if a==1 then...).
It seems to work faster now. Thanks! I really don't understand why the level restarting isn't working...
*BUMP* Latest code:

http://pastebin.com/KTPaXbKu

I've pretty much given up on this. If you know how to make the variables reset, please tell, so I can get this project over with.
I tried it out and played it through I got as far as Level 3 before I got an error on line 268, attempt to index field '?' in onArrowKey. I see the problem you mean, though, but something different is definitely happening, because the whole screen flashes when you're moving in out-of-bounds areas. Also, on level 3, why did the two-block bridge between the first and second areas of the three not appear until I made a few moves? Is that intentional?
KermMartian wrote:
I tried it out and played it through I got as far as Level 3 before I got an error on line 268, attempt to index field '?' in onArrowKey. I see the problem you mean, though, but something different is definitely happening, because the whole screen flashes when you're moving in out-of-bounds areas. Also, on level 3, why did the two-block bridge between the first and second areas of the three not appear until I made a few moves? Is that intentional?


Kerm, there are buttons to press on level three. One is gray, and the other is blue(I think). The first one, you can press with one half of your block, and the other one, you have to press with your whole blocks weight.
Ahh, very cool. I didn't see the buttons there. I think perhaps they should be more visually-distinct in the final form, but that's not to worry about until the basic gameplay works. I'm glad that wasn't a bug and that I just happened to stumble onto the button. Anyway, I'll see what I can do as far as helping you track down the issues.
KermMartian wrote:
Ahh, very cool. I didn't see the buttons there. I think perhaps they should be more visually-distinct in the final form, but that's not to worry about until the basic gameplay works. I'm glad that wasn't a bug and that I just happened to stumble onto the button. Anyway, I'll see what I can do as far as helping you track down the issues.

Okay. Thanks.
I need to test this when I get home, but I suspect that this will do the trick for you. I pulled the level reset code into a function called onNewLevel(), called that from two places, and added a red bottom-to-top wipe effect when the player dies.

http://pastebin.com/cwEtD7Q7

Edit: Tons and tons of fixes and optimizations! Have fun.
http://pastebin.com/vvTATvBV
  
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 2 of 2
» 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