Random Issue.

A place for tutorials on how to get the most out of Flash

Random Issue.

Postby Suraru » Thu Feb 23, 2012 9:43 pm

So I was coding with the program I hate most... Java.

For some reason the program crashes, I have no idea why... help?


EXPORTED WRONG! Gimme a day to get to the computer so I can tweak the exporter into a more java friendly style....
[spr]
Code: Select All Code
Chap02-03-04FirstEncounter's Code
Created by: Suraru
World
Events
When the world starts
Do: World.main ( );
 



Methods
  public void main ( ) {
     
       World.setup ( );
  World.play ( );
  }


  public void setup ( ) {
     
       // PreSetup
  if ( ( Player.isGay ( ) ) ) { . }
     Do Nothing 
  } else {
    spiderRobot .resize( 3 );
  }
  }


  public void play ( ) {
    Number Distance = 1 ;
       Distance .set( value , ( spiderRobot .distanceTo( rock(Front) ) ) );
  doInOrder {
       doInOrder { . . . . }
       CheekyAlien .move( UP , 1 meter  );
  CheekyAlien .say( Slithy Troves? );
  spiderRobot.neck .turn( LEFT , 1 revolution  );
  spiderRobot .turnToFace( alienOnWheels.neck03 );
  }
  doTogether { . . . . . . . . }
       // Moon Hop
  spiderRobot .move( FORWARD , ( ( Distance - ( subject = rock(Front) .getWidth() ) ) ) );
  doInOrder {
       spiderRobot .move( UP , 0.5 meters  ); duration = 0.5 seconds 
  spiderRobot .move( DOWN , 0.5 meters  ); duration = 0.5 seconds 
  }
  World.Move Leg ( Leg = spiderRobot.body.rearLegBase.rearLegUpperJoint );
  World.Move Leg ( Leg = spiderRobot.body.backRightLegBase.backRightLegUpperJoint );
  World.Move Leg ( Leg = spiderRobot.body.frontRightLegBase );
  World.Move Leg ( Leg = spiderRobot.body.frontLeftLegBase );
  World.Move Leg ( Leg = spiderRobot.body.backLeftLegBase );
  }
  doInOrder {
       // Alien Hide
  CheekyAlien .move( DOWN , 1 meter  );
  if ( ( spiderRobot .isShorterThan( rock(Front) ) ) ) {
       spiderRobot.neck .move( UP , 0.2 meters  );
  wait( 0.25 seconds  );
  spiderRobot.neck .move( DOWN , 0.2 meters  );
  } else {
    spiderRobot .turn( RIGHT , 1 revolution  );
  }
  spiderRobot .turnToFace( Camera );
  spiderRobot.neck.head .set( color , (1, 0, 0) );
  spiderRobot.neck.head .say( Houston, we have a problem! ); duration = 2 seconds 
  }
  }
  }


  public void Move_Leg ( Object Leg) {
     
       doInOrder {
       Leg .turn( FORWARD , 0.08 revolutions  ); duration = 0.5 seconds 
  Leg .turn( BACKWARD , 0.08 revolutions  ); duration = 0.5 seconds 
  }
  }
[/spoiler]
Last edited by Suraru on Sun Feb 26, 2012 7:05 am, edited 3 times in total.
"Thanks to your unfortunate life, I've found myself being more and more grateful!"

"Are you horny? Do you not want babies? Just watch porn!
They'll make you jizz in your pants, so others don't have to!"
Suraru
 
Joined: Fri Nov 25, 2011 4:13 am
Location: Behind you.

Re: Random Issue.

Postby BlueLight » Fri Feb 24, 2012 2:18 am

first thing i saw is that your main method seems to be declared wrong. It might still run but it's not advised.

Code: Select All Code
public static void main(String args[]){ // there you go!

EDIT!!!!!!!!!!
I'm sorry but dude how the hell did this fucking compile? why i don't care that your out of practice or anything, however, I am scared at some of the things your doing and it compiled.
Also can you give us the complete class.
User avatar
BlueLight
Gangs n' Whores Developer
 
Joined: Sat Jun 04, 2011 8:23 am

Re: Random Issue.

Postby Suraru » Fri Feb 24, 2012 5:08 am

Uhhh, maybe.

Its a secret project some of my friends are working with, also, I am using a program to program java.

Its really cool actually, it saves a lot of time, makes things a bit easier when your out of practice like me. The only downside is some of the coding if offers doesn't work with java so you have to be careful which lines you use. Its mostly click and drag segments that identify certain objects/variables/data and change if you change it. Its really similar to Alice now that I think about it. But alice doesn't export to java correctly, and your stuck with what they give you.... This program is better (sorry, have to keep it secret for now).
http://en.wikipedia.org/wiki/Alice_(software)

And it does seem to run until just before the alien hide part, that's when it crashes, your edit didn't really help... at all.
"Thanks to your unfortunate life, I've found myself being more and more grateful!"

"Are you horny? Do you not want babies? Just watch porn!
They'll make you jizz in your pants, so others don't have to!"
Suraru
 
Joined: Fri Nov 25, 2011 4:13 am
Location: Behind you.

Re: Random Issue.

Postby BlueLight » Fri Feb 24, 2012 5:40 am

Sorry but i can't make this workable at all without guessing what your doing.
User avatar
BlueLight
Gangs n' Whores Developer
 
Joined: Sat Jun 04, 2011 8:23 am

Re: Random Issue.

Postby Suraru » Fri Feb 24, 2012 5:44 am

ignoring the format bullshit, hopefully you can spot an error with the coding that has to do with //alien hide, because thats where it crashes.

I can't spot an error, and its not a separate method so its all there... I think
"Thanks to your unfortunate life, I've found myself being more and more grateful!"

"Are you horny? Do you not want babies? Just watch porn!
They'll make you jizz in your pants, so others don't have to!"
Suraru
 
Joined: Fri Nov 25, 2011 4:13 am
Location: Behind you.

Re: Random Issue.

Postby BlueLight » Fri Feb 24, 2012 5:50 am

Might help if i could have the error that pops up in the console. I might be able to tell you what it is from that but i will check alien hide.

Code: Select All Code
CheekyAlien.move( DOWN , 1 meter  );
      if ((spiderRobot.isShorterThan(rock(Front)))){
         spiderRobot.neck.move(UP,0.2 meters);
         wait(0.25 seconds);
         spiderRobot.neck .move(DOWN,0.2 meters);
      } else {
         spiderRobot .turn( RIGHT , 1 revolution  );
      }
      spiderRobot .turnToFace( Camera );
      spiderRobot.neck.head .set( color , (1, 0, 0) );


So with this code that thing that pops out the most to me is stuff like: meters, and revolution

My best guess is that Meters and Revolutions are classes (Syntax is wrong however) so it should look something like
Code: Select All Code
meters(0.2);
//but it could be:
0.2, meters()


but for sure something like this would not work.
Code: Select All Code
0.2 meters


you need a comma between them at least.
Last edited by BlueLight on Fri Feb 24, 2012 6:01 am, edited 2 times in total.
User avatar
BlueLight
Gangs n' Whores Developer
 
Joined: Sat Jun 04, 2011 8:23 am

Re: Random Issue.

Postby Suraru » Fri Feb 24, 2012 5:53 am

Ill PM you the error report tomorrow.
"Thanks to your unfortunate life, I've found myself being more and more grateful!"

"Are you horny? Do you not want babies? Just watch porn!
They'll make you jizz in your pants, so others don't have to!"
Suraru
 
Joined: Fri Nov 25, 2011 4:13 am
Location: Behind you.


Return to Tutorials



Who is online

Users browsing this forum: No registered users