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
 

Are there pointers in roblox?

Previous Thread :: Next Thread 
Neflicx is not online. Neflicx
Joined: 24 Jun 2012
Total Posts: 42
26 Jun 2012 06:59 PM
If so, how would you create one?
Report Abuse
GreenDay987 is not online. GreenDay987
Joined: 21 May 2011
Total Posts: 7027
26 Jun 2012 07:00 PM
What do you mean by "pointers"?




~"If I win the lottery, the first thing I'm buying is an optical mouse"~
Report Abuse
chicka123 is not online. chicka123
Joined: 05 Jul 2008
Total Posts: 25356
26 Jun 2012 07:09 PM
Do you mean memory pointers?

I don't think thats possible in Lua.
Report Abuse
Neflicx is not online. Neflicx
Joined: 24 Jun 2012
Total Posts: 42
26 Jun 2012 07:09 PM
A pointer is a variable that 'points' at another variable. For example, you made a function called increment that looked like this :

function increment(value)
value = value + 1
end

increment(THISVALUE)

When you call on the function, it will increment THISVALUE instead of having to to say:

THISVALUE = increment(THISVALUE)

So it changes the value directly. In C++, you would create a pointer like this:

int n = 1 // Initialize n as 1
p = &n // p now points to n

Now to change n using p, you have to use an asterisk.

*p++

This will increment n.'
Now is this possible in ROBLOX?
Report Abuse
Neflicx is not online. Neflicx
Joined: 24 Jun 2012
Total Posts: 42
26 Jun 2012 07:10 PM
@chicka
Yes! exactly. I was typing when you posted that.
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