Page 3 of 4

Re: Hello, trying to print a text i input

Posted: Thu Dec 12, 2013 7:58 am
by MysticPing2
But i dont understand how itl work beacuse if i loop trough, it will only recognize what i do while it is looping trough one of the things, and it cant loop infinite, it needs some delay, which makes it non functional. Also i cant make a app on my mac to try it out argh

I think i did everything right, the only problem is i cant make a .love

Re: Hello, trying to print a text i input

Posted: Thu Dec 12, 2013 9:35 am
by veethree
I'm on my phone right now and don't feel like typing too much, I'll explain it properly when I get home.

Making a .love on mac is basically the same as on windows. You don't need to make a .love to run the game though. Just drag the folder with the files to the love executable.

Re: Hello, trying to print a text i input

Posted: Thu Dec 12, 2013 10:33 am
by MysticPing2
but my mac cant run executables lol

Re: Hello, trying to print a text i input

Posted: Thu Dec 12, 2013 10:47 am
by MysticPing2
The problem i have is that i need to zip it as a .love which uses the terminal, which never works for me

Re: Hello, trying to print a text i input

Posted: Thu Dec 12, 2013 12:11 pm
by veethree
You just have to select the files (not the folder, the files inside it) and rightclick then press "compress", Then rightclick in the .zip file, and change the extension to .love

I modified the original example i gave you to work nicely with multiple textboxes. It uses ipairs loops to draw and update the textboxes, and has a handy function so you can easily add as many textboxes as you want.

I don't mind if you just modify my code, But it would really behoove you more to try and understand it and learn from it. I can answer any questions you may have regarding it.

Re: Hello, trying to print a text i input

Posted: Thu Dec 12, 2013 4:18 pm
by MysticPing2
Argh didnt notice i didnt submit my reply, but if i do a loop woudnt it either crash the program or my system. And if i add a delay if would only detect every and so often

Re: Hello, trying to print a text i input

Posted: Thu Dec 12, 2013 4:21 pm
by veethree
MysticPing2 wrote:Argh didnt notice i didnt submit my reply, but if i do a loop woudnt it either crash the program or my system. And if i add a delay if would only detect every and so often
No it wouldn't, It would loop through the textboxes, Then go to the next frame and do the same thing again. This won't have any effect on performance unless you have many textboxes.

Re: Hello, trying to print a text i input

Posted: Thu Dec 12, 2013 4:28 pm
by MysticPing2
ok, atm im using the non loop method does not work, ill send you a .love so you see. The secound text box acts weirdly and does not work

Re: Hello, trying to print a text i input

Posted: Thu Dec 12, 2013 4:33 pm
by MysticPing2
Oh sorry didnt notice any of your last posts!

Wow thats so smart, well im reading on yoru code now, sorry for the ignorance, didnt mean to do it, i was kindoff busy at school

(got a A in bioology, YEY)

Re: Hello, trying to print a text i input

Posted: Thu Dec 12, 2013 5:06 pm
by MysticPing2

Code: Select all

pop = tonumber(textboxes[1.text])
income = tonumber(textboxes[2.text])
tax = tonumber(textboxes[3.text])
healthcare = tonumber(textboxes[4.text])
education = tonumber(textboxes[5.text])
Im trying to do this and im getting a syntax error on the first line, any idea why?
i think i know the problem, unsure on how to fix it


NVM fixed it