Thursday, 08 January 2009
 
  Home arrow Forum  
Main Menu
Home
News
Forum
Documentation
Download
Links
Administrator
Login Form
Welcome, Guest. Please login or register.
January 08, 2009, 07:17:02 AM
Username: Password:
Login with username, password and session length

Forgot your password?
Crap. DUMB STYLUS DIE!
DSLua Community
Welcome, Guest. Please login or register.
January 08, 2009, 07:17:02 AM
1724 Posts in 316 Topics by 10247 Members
Latest Member: Samnmoora
DSLua Community  |  DSLua - Best scripting language for Nintendo DS  |  Need Help?  |  Crap. DUMB STYLUS DIE! « previous next »
Pages: [1]
Author Topic: Crap. DUMB STYLUS DIE!  (Read 662 times)
daltonlaffs
Waxing Gibbous
****
Posts: 340


Freaking Insane


WWW
« on: April 30, 2006, 07:31:51 AM »

I'm REALLY getting annoying, huh?  Roll Eyes , I NEED MORE HELP. Check the attached file. It's MORE junk I'm working on. You see a wifi animation (thanx waruwaru), and a button (32*16). I need to get it so when you touch the button, the top screen says 'YAY! YOU TOUCHED THE BUTTON!', and when it's not touched, 'TOUCH THE BUTTON!', and when it WAS touched, but now it's not, 'TOUCH IT AGAIN!'. Difficult, I know, but I need help. I also included a glitchy try at this I made, but I don't understand why it says 'error' in line '47'.  Tongue

* TOUCHIE.zip (4.2 KB - downloaded 34 times.)
Logged

Code:
-- Bored? Read code line below.
-- Bored? Read code line above.



^^ That works, I SWEAR! ^^
waruwaru
Administrator
Waxing Crescent
*****
Posts: 94


« Reply #1 on: April 30, 2006, 01:56:04 PM »

I also included a glitchy try at this I made, but I don't understand why it says 'error' in line '47'.  Tongue

Actually, the glitchy one is working ok after you fix the error on line 47 (and another somewhere on 58).  Basically, the error is telling you that look at your if statement carefully.

This is an assignment, it means you want variable Styluson to have value true
Code:
Styluson = true

If you want to compare values, then you have to use 2 = signs, like
Code:
if Styluson == true then

This is a common bug in C/C++ as well, but in C/C++ you won't get an error, your program just won't work right...  Heh Smiley

To keep track of if the button has been pressed before, you just need another variable.  Set it to false at the beginning of your code, then when the user click on button, you set it to true.  Now you just show different message base on your variable.

Have fun!
Waruwaru
Logged
daltonlaffs
Waxing Gibbous
****
Posts: 340


Freaking Insane


WWW
« Reply #2 on: April 30, 2006, 05:56:35 PM »

oh. DUH! Thanks again, waruwaru. If this keeps up, I'm gonna give you a message a second!  Wink  Lips sealed
Logged

Code:
-- Bored? Read code line below.
-- Bored? Read code line above.



^^ That works, I SWEAR! ^^
Pages: [1]
« previous next »
    Jump to:  



    (C) 2009 DSLua

    DSLua - Best scripting language for Nintendo DS home-brew!