Search found 345 matches

by Zilarrezko
Tue Feb 11, 2014 1:55 am
Forum: Support and Development
Topic: OOP help
Replies: 48
Views: 24481

Re: OOP help

In which cases when you enter a value into a table will it's key be a numerical value such as [1] or [2]? Like table.insert(t,{})?
by Zilarrezko
Mon Feb 10, 2014 5:35 pm
Forum: Support and Development
Topic: Minor problem with text printing
Replies: 9
Views: 3539

Re: Minor problem with text printing

makes sense, and now it's saying somewhere it's comparing with a nil number. Could it be clickX & Y ?
by Zilarrezko
Mon Feb 10, 2014 5:25 pm
Forum: Support and Development
Topic: OOP help
Replies: 48
Views: 24481

Re: OOP help

so then in which cases do tables get a numerical value when entered?
by Zilarrezko
Sun Feb 09, 2014 5:30 pm
Forum: Support and Development
Topic: OOP help
Replies: 48
Views: 24481

Re: OOP help

[quote="Robin" What you really need is to use ipairs , instead of pairs . Unlike pairs , which goes over all the keys in the table, ipairs only goes over integer keys from 1 to n , which is what you want in this case.[/quote] Ah! So it skips all the things like metatables and other tables?
by Zilarrezko
Sun Feb 09, 2014 5:27 pm
Forum: Support and Development
Topic: Minor problem with text printing
Replies: 9
Views: 3539

Re: Minor problem with text printing

Gaude! And now it appears the mouseover thing isn't working. I did a couple adjustments, although i'm obviously missing something.

If only I was one of those programmers that can just do anything without any assistance.
by Zilarrezko
Sun Feb 09, 2014 3:06 am
Forum: Support and Development
Topic: OOP help
Replies: 48
Views: 24481

Re: OOP help

So now I need to create some type of function that when I call it it creates a new instance in the table "t". t = { } prototype = { __index = { x = 0, y = 0, text = "banana" } } id = 0 t.new = function() t[1 + id] = setmetatable({}, prototype) id = id + 1 end but I believe if I t...
by Zilarrezko
Sun Feb 09, 2014 12:28 am
Forum: Support and Development
Topic: OOP help
Replies: 48
Views: 24481

Re: OOP help

uh... k... I don't see what setting a index equal to the table of which the index is in does, and I'm guessing in making the first argument in setmetatable with {name = name, parent=parent} is creating a table with those values. To be honest I might be more confused now than when I started.Why would...
by Zilarrezko
Sat Feb 08, 2014 11:18 pm
Forum: Support and Development
Topic: Minor problem with text printing
Replies: 9
Views: 3539

Re: Minor problem with text printing

true, though now I get another error saying that line 45 in gui.lua it says that v.text is a table value or at least v in the for loop is a table.
by Zilarrezko
Sat Feb 08, 2014 7:43 pm
Forum: Support and Development
Topic: Minor problem with text printing
Replies: 9
Views: 3539

Minor problem with text printing

Not a big deal, can't even get text to print at this point. So I come crawling back to LÖve's forum for help. Been trying some basic OOP and can't get it to work. When you right click the box should appear saying "hello" somewhere on it, but that doesn't seem happen.
by Zilarrezko
Sat Feb 08, 2014 5:29 am
Forum: Support and Development
Topic: function returning
Replies: 2
Views: 1355

Re: function returning

It's... so.... beautiful :cry:


thanks! :awesome: now on to my other problems! AWAYYYYY!

http://www.youtube.com/watch?v=Rgrof_fmXuk