Hello, trying to print a text i input

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
MysticPing2
Prole
Posts: 33
Joined: Tue Dec 10, 2013 7:08 pm

Re: Hello, trying to print a text i input

Post 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
User avatar
veethree
Inner party member
Posts: 877
Joined: Sat Dec 10, 2011 7:18 pm

Re: Hello, trying to print a text i input

Post 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.
MysticPing2
Prole
Posts: 33
Joined: Tue Dec 10, 2013 7:08 pm

Re: Hello, trying to print a text i input

Post by MysticPing2 »

but my mac cant run executables lol
MysticPing2
Prole
Posts: 33
Joined: Tue Dec 10, 2013 7:08 pm

Re: Hello, trying to print a text i input

Post 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
User avatar
veethree
Inner party member
Posts: 877
Joined: Sat Dec 10, 2011 7:18 pm

Re: Hello, trying to print a text i input

Post 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.
Attachments
textboxes.love
(1.9 KiB) Downloaded 85 times
MysticPing2
Prole
Posts: 33
Joined: Tue Dec 10, 2013 7:08 pm

Re: Hello, trying to print a text i input

Post 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
User avatar
veethree
Inner party member
Posts: 877
Joined: Sat Dec 10, 2011 7:18 pm

Re: Hello, trying to print a text i input

Post 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.
MysticPing2
Prole
Posts: 33
Joined: Tue Dec 10, 2013 7:08 pm

Re: Hello, trying to print a text i input

Post 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
Attachments
Tax.love
(1.42 KiB) Downloaded 90 times
MysticPing2
Prole
Posts: 33
Joined: Tue Dec 10, 2013 7:08 pm

Re: Hello, trying to print a text i input

Post 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)
MysticPing2
Prole
Posts: 33
Joined: Tue Dec 10, 2013 7:08 pm

Re: Hello, trying to print a text i input

Post 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
Last edited by MysticPing2 on Thu Dec 12, 2013 5:46 pm, edited 1 time in total.
Post Reply

Who is online

Users browsing this forum: Google [Bot] and 3 guests