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
 

I need some help with this :P

Previous Thread :: Next Thread 
abalonemascarponi is not online. abalonemascarponi
Joined: 13 Jan 2011
Total Posts: 2648
29 May 2013 11:42 AM
So, I started scripting today, I've been messing with around with some scripts for quite a while now. But I have a problem. So I made this pointless little script to practise, but it doesent really work. It is supposed to solve two equasions and then either say: "The result from both equasions is " ..result1. Or "The result of equasion 1 is " ..result1 " and the result of equasion 2 is " ..result2.

Here's the full script:

Number1 = 21
Number2 = 10
Number3 = 30
Number4 = 20
Result1 = Number1 - Number2
Result2 = Number3 - Number4

if
Result1 == Result2
then
Workspace.Message.Text = "The results are both " ..Result1
wait(2)
Workspace.Message.Text = ""
else
Workspace.Message.Text = "The result of equation 1 is: " ..Result1 "The result of
equation 2 is: " ..Result2
wait(2)
Workspace.Message.Text = ""
end


So here's the error message:

18:35:53.805 - Workspace.Script:17: attempt to call global 'Result1' (a number value)
18:35:53.806 - Script "Workspace.Script", Line 17
18:35:53.806 - stack end

I just dont know what's wrong with Result1. Is it because in the upper part I write

Workspace.Message.Text = "The results are both " ..Result1?

Please help me if you can.

Report Abuse
StrikerBOY606 is not online. StrikerBOY606
Joined: 25 Oct 2010
Total Posts: 747
29 May 2013 11:44 AM
This line:
Workspace.Message.Text = "The result of equation 1 is: " ..Result1 "The result of
equation 2 is: " ..Result2

Should be:

Workspace.Message.Text = "The result of equation 1 is: " ..Result1.. "The result of
equation 2 is: " ..Result2

You forgot a '..' after Result1
Report Abuse
abalonemascarponi is not online. abalonemascarponi
Joined: 13 Jan 2011
Total Posts: 2648
29 May 2013 11:46 AM
Thank you Striker!
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