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: Ok I am new to scripting and I am stuck with somthing

Previous Thread :: Next Thread 
unknown1616 is not online. unknown1616
Joined: 04 Nov 2009
Total Posts: 1025
01 Feb 2012 10:21 AM
Ok I am new to scripting and I am stuck with somthing that does not make sense. I am working on learning variables at the moment and I am stuck on somthing.


Ok it says that

The inner scope is a "child" of the current scope. The current scope cannot access variables in the inner scope.

and

The outer scope is a the "parent" of the current scope. The current scope has access to any variables in the outer scope.



Reading that I followed this script in a picture to the right

That looks like this.

a = 1
if a == 1 then
print(a) -->1
local b = 2
if b == 2 then
Print(b) -->2
local c = 3
d = 4
end
print (c) -->nill
print (d) -->4
end
print(b) -->nill


Ok if the inner sope is the child of the current scope and the current scope cannot access variables in the inner scope then why does.

So if the current scope cant get info from the inner scope then why does it get

print (c) -->nill
print (d) -->4

From the inner scope. and even after it says end it still gets information.


To see what i am talking about it is in the wiki site.


Here is a link


http://wiki.roblox.com/index.php/Variables


Go down to variable Scoped and look to the right that. Thar image with scripting in it thats Blue, Red, Green.

Please tell me if I am right.

Green is the child
red is the current
and blue is the parent.


Help me out please I am stuck
Report Abuse
Trioxide is not online. Trioxide
Joined: 29 Mar 2011
Total Posts: 32902
01 Feb 2012 10:27 AM
[ Content Deleted ]
Report Abuse
unknown1616 is not online. unknown1616
Joined: 04 Nov 2009
Total Posts: 1025
01 Feb 2012 10:29 AM
I thalt the name of one would not get looks much :/
Report Abuse
Notunknown99 is not online. Notunknown99
Joined: 05 Sep 2008
Total Posts: 25360
01 Feb 2012 10:34 AM
Its 'Nil' not 'Nill'
Report Abuse
ColonelxPopcorn is not online. ColonelxPopcorn
Joined: 30 Jan 2012
Total Posts: 2
01 Feb 2012 11:24 AM
first you go **** yourself
then get banned
call roblox
get your account back

repeat these steps
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