Having trouble getting a program running

General discussion about LÖVE, Lua, game development, puns, and unicorns.
User avatar
Luiji
Party member
Posts: 396
Joined: Mon May 17, 2010 6:59 pm

Re: Having trouble getting a program running

Post by Luiji »

So...does that insert that "black hole" functionality or does it do something else that I don't understand or what? I just want to make sure before inserting that into my code...

Sorry if this is a stupid question.
Good bye.
User avatar
thelinx
The Strongest
Posts: 857
Joined: Fri Sep 26, 2008 3:56 pm
Location: Sweden

Re: Having trouble getting a program running

Post by thelinx »

Luiji wrote:So...does that insert that "black hole" functionality or does it do something else that I don't understand or what? I just want to make sure before inserting that into my code...

Sorry if this is a stupid question.
It just doesn't remember any variables whose names begin with _.
User avatar
Luiji
Party member
Posts: 396
Joined: Mon May 17, 2010 6:59 pm

Re: Having trouble getting a program running

Post by Luiji »

Wait, if it is any variables that start with _, wouldn't this mess up Lua constants such as _VERSION?
Good bye.
User avatar
Robin
The Omniscient
Posts: 6506
Joined: Fri Feb 20, 2009 4:29 pm
Location: The Netherlands
Contact:

Re: Having trouble getting a program running

Post by Robin »

Luiji wrote:Wait, if it is any variables that start with _, wouldn't this mess up Lua constants such as _VERSION?
No, because that one's already defined.

Two caveats:
1) It doesn't work for locals
2) You can still use rawset() to set a global starting with _
Help us help you: attach a .love.
User avatar
kikito
Inner party member
Posts: 3153
Joined: Sat Oct 03, 2009 5:22 pm
Location: Madrid, Spain
Contact:

Re: Having trouble getting a program running

Post by kikito »

Jasoco wrote:Oh, then why does kikito's code have def instead? Is that not valid code?
Woops. Sorry about that.

I allways make that mistake. I'll fix the post.
When I write def I mean function.
Post Reply

Who is online

Users browsing this forum: Bing [Bot], slime and 54 guests