3D Rad - Free 3D game maker - Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

HOW TO POST TO THIS FORUM: after you have registered to the forum, please don't forget to send me an email with 'Please activate my forum account (e-mail: your-email-here)' as subject.

Pages: 1 2 [3]

Author Topic: Script related questions  (Read 4009 times)

11Dogs

  • Full Member
  • ***
  • Posts: 147
Re: Script related questions
« Reply #30 on: May 17, 2012, 04:04:55 PM »
Hey dogtorque... few things here in that script.

First, leave out the semicolon (;) after your else() statement.

Second, your "speed" variable needs to be equal (=) to something.
For example: "float speed = IN_2;"
Logged

n_iron

  • Sr. Member
  • ****
  • Posts: 408
    • WWW
Re: Script related questions
« Reply #31 on: May 17, 2012, 11:03:11 PM »
Hi dogt.... 11Dogs is right about the speed needing an assignment but the else doesn't work like that.

Try and lay out code with indented sections this helps locate faults and generally makes easier to read.

Code: [Select]
void Main(){

   float speed-IN_0;

   if(speed > 2) {
      OUT_2 = 2 ;
   }else if(speed > 0 ) {
      OUT_2 = 3;
   }

}
Logged

stevenalexwyant

  • Newbie
  • *
  • Posts: 13
    • WWW
Re: Script related questions
« Reply #32 on: November 04, 2012, 11:27:03 AM »
can some one help me my client game is just gave me a black screen ???
Logged
Pages: 1 2 [3]
« previous next »