generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripting Helpers
Home Search
 

Re: java (I know it's not lua)

Previous Thread :: Next Thread 
MoreMonkey8 is not online. MoreMonkey8
Joined: 13 Dec 2010
Total Posts: 1127
15 Sep 2013 05:00 AM
I have this:

var compare=function(choice1, choice2){
if (choice1===choice2){
console.log("The result is a tie!");
} };

it works. but the thing I'm following says
"Inside the function, write an if statement such that if the two parameters equal each other, the function will return "The result is a tie!""
Report Abuse
MoreMonkey8 is not online. MoreMonkey8
Joined: 13 Dec 2010
Total Posts: 1127
15 Sep 2013 05:04 AM
any ideas/help?
Report Abuse
DragonODeath is not online. DragonODeath
Joined: 02 May 2011
Total Posts: 1252
15 Sep 2013 05:04 AM
Sadly, I don't know about java. So...cntkillme?
Report Abuse
MoreMonkey8 is not online. MoreMonkey8
Joined: 13 Dec 2010
Total Posts: 1127
15 Sep 2013 05:04 AM
*any helpful posts?
Report Abuse
Notunknown99 is not online. Notunknown99
Joined: 05 Sep 2008
Total Posts: 25360
15 Sep 2013 05:05 AM
That doesn't look like Java... Is that JavaScript?
Report Abuse
MoreMonkey8 is not online. MoreMonkey8
Joined: 13 Dec 2010
Total Posts: 1127
15 Sep 2013 05:05 AM
Yes, javascript, I meant to say javaScript, not java.
Report Abuse
Notunknown99 is not online. Notunknown99
Joined: 05 Sep 2008
Total Posts: 25360
15 Sep 2013 05:07 AM
Comparison is === in JavaScript..?
Report Abuse
MoreMonkey8 is not online. MoreMonkey8
Joined: 13 Dec 2010
Total Posts: 1127
15 Sep 2013 05:08 AM
= sets, === verifies, yea.

any ideas/help about the return?
Report Abuse
Notunknown99 is not online. Notunknown99
Joined: 05 Sep 2008
Total Posts: 25360
15 Sep 2013 05:08 AM
Ah. I see.
Report Abuse
Notunknown99 is not online. Notunknown99
Joined: 05 Sep 2008
Total Posts: 25360
15 Sep 2013 05:09 AM
A quick read says that == compares, regardless of type and === needs an exact match... Thats quite nice.
Report Abuse
MoreMonkey8 is not online. MoreMonkey8
Joined: 13 Dec 2010
Total Posts: 1127
15 Sep 2013 05:09 AM
any help/ideas?
Report Abuse
Notunknown99 is not online. Notunknown99
Joined: 05 Sep 2008
Total Posts: 25360
15 Sep 2013 05:11 AM
What should/does happen?
Report Abuse
MoreMonkey8 is not online. MoreMonkey8
Joined: 13 Dec 2010
Total Posts: 1127
15 Sep 2013 05:13 AM
well, as I have it now, it works as I want, but the instructions I'm following it wants a return and won't let me follow on, until it has a return and is working.... :/
Report Abuse
Notunknown99 is not online. Notunknown99
Joined: 05 Sep 2008
Total Posts: 25360
15 Sep 2013 05:13 AM
return "The result is a lie";

?
Report Abuse
MoreMonkey8 is not online. MoreMonkey8
Joined: 13 Dec 2010
Total Posts: 1127
15 Sep 2013 05:18 AM
eh, I'll skip it for now..
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image