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 » Scripters
Home Search
 

Re: Why I'm receiving the error of W001: Unknown Global?

Previous Thread :: Next Thread 
timebombed is online. timebombed
Joined: 08 Mar 2016
Total Posts: 902
27 Oct 2017 03:11 PM
I need help fixing this,

I need to assign

left, back, forward, right, page1, page2.

ty

just give me one example and that'd be fine


Report Abuse
crazyman32 is not online. crazyman32
Joined: 13 Apr 2008
Total Posts: 18027
27 Oct 2017 03:12 PM
http://wiki.roblox.com/index.php?title=Script_analysis#W001:_Unknown_global_.27name.27
Report Abuse
timebombed is online. timebombed
Joined: 08 Mar 2016
Total Posts: 902
27 Oct 2017 03:24 PM
Like this?
local obj = {game.StarterGui.ScreenGui.Frame.page1}
obj.Name = 'page1'




Report Abuse
crazyman32 is not online. crazyman32
Joined: 13 Apr 2008
Total Posts: 18027
27 Oct 2017 03:27 PM
The warning message is probably being displayed because your variables (left, back, forward, right, page1, page2) have not been defined anywhere before. Thus when you try to reference them, it's letting you know that those variables don't exist.

So the solution is to assign those variables. You assign a variable by using the "local" keyword followed by the variable name. For instance:

local left = blah.something.left

And you have to define all your variables like that before trying to use them.
Report Abuse
timebombed is online. timebombed
Joined: 08 Mar 2016
Total Posts: 902
27 Oct 2017 03:30 PM
Ah, tysm.


Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • 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