Need Help

Non-platform specific questions.

Need Help

Postby tzoli » Thu Mar 10, 2011 3:33 pm

Hi.
What is the problem whit this?:
Code: Select all
if(textNumber %  htime){
//...
}

I would like to reach if the textNumber can be divide with 40(without rest).
Please Help.
Creepers are capable of climbing ladders, despite lacking arms. (Minecraft wiki)
User avatar
tzoli
 
Posts: 343
Joined: Sat Jun 12, 2010 6:54 pm
Location: Behind you
Score: 15 Give a positive score

Re: Need Help

Postby schnellboot » Thu Mar 10, 2011 4:30 pm

textNumber%40==0
schnellboot
 
Posts: 819
Joined: Sat Mar 31, 2007 1:35 pm
Location: Germany
Score: 102 Give a positive score

Re: Need Help

Postby tzoli » Thu Mar 10, 2011 5:33 pm

Thanks.
But a have an error:
(htime=integer(values:40,20,15 or 10)
Code: Select all
if(textNumber % htime == 0){

                       wheaat = wheaat + ew;
                    }
textNumber = textNumber +1;
Creepers are capable of climbing ladders, despite lacking arms. (Minecraft wiki)
User avatar
tzoli
 
Posts: 343
Joined: Sat Jun 12, 2010 6:54 pm
Location: Behind you
Score: 15 Give a positive score

Re: Need Help

Postby Game A Gogo » Thu Mar 10, 2011 5:36 pm

if((int)textNumber%(int)htime == 0)wheaat+=ew;
textNumber++;
Programming games is an art,
    Respect it.
User avatar
Game A Gogo
 
Posts: 3466
Joined: Wed Jun 29, 2005 10:49 pm
Location: French Canada *laughs*
Score: 181 Give a positive score

Re: Need Help

Postby tzoli » Thu Mar 10, 2011 6:07 pm

Thanks :D It's working :D
Creepers are capable of climbing ladders, despite lacking arms. (Minecraft wiki)
User avatar
tzoli
 
Posts: 343
Joined: Sat Jun 12, 2010 6:54 pm
Location: Behind you
Score: 15 Give a positive score


Return to General

Who is online

Users browsing this forum: No registered users and 1 guest