Search found 265 matches

by xNick1
Fri Dec 15, 2017 8:10 pm
Forum: Support and Development
Topic: Game with separate files tryout
Replies: 32
Views: 4262

Re: Game with separate files tryout

I can't. I'm posting from my phone. I'll answer tomorrow if no one else provides a fix in the meantime
by xNick1
Fri Dec 15, 2017 7:56 pm
Forum: Support and Development
Topic: Game with separate files tryout
Replies: 32
Views: 4262

Re: Game with separate files tryout

SynfigMaster91 wrote:
Fri Dec 15, 2017 7:39 pm
here's the file. It's out there.squaremoving.love

Wrong file name mate. It's square not moving xD
Ok I'm bad, I'm sorry xD
by xNick1
Fri Dec 15, 2017 7:03 pm
Forum: Support and Development
Topic: Game with separate files tryout
Replies: 32
Views: 4262

Re: Game with separate files tryout

It took me 7 months before I could manage to start making my own game from scratch. Still I have to ask for help sometimes cause of something which I don't know how it works. All that backed up by the fact that I work as web developer and I code almost everyday since I was 16. So no, you're not goin...
by xNick1
Fri Dec 15, 2017 6:58 pm
Forum: Support and Development
Topic: Game with separate files tryout
Replies: 32
Views: 4262

Re: Game with separate files tryout

I'm sorry man, I don't really know how to help you.
Please consider following some tutorials.
Sheepolution has some good ones on his website, they helped me a little when I started around a year ago.
by xNick1
Fri Dec 15, 2017 6:54 pm
Forum: Support and Development
Topic: Game with separate files tryout
Replies: 32
Views: 4262

Re: Game with separate files tryout

... local square = {} speed = 40 function square.update( dt ) if love.keyboard.isDown("right") then square.x = square.x + speed * dt end if love.keyboard.isDown("left") then square.x = square.x - speed * dt end if love.keyboard.isDown("up") then square.y = square.y - speed * dt end if love.keyboard...
by xNick1
Fri Dec 15, 2017 6:51 pm
Forum: Support and Development
Topic: Game with separate files tryout
Replies: 32
Views: 4262

Re: Game with separate files tryout

Now you're using the table again, so it's square.x in your draw callback etc Please consider following a tutorial about variables and tables I know about variables, but I'm doing this. local square function square.update( dt ) if love.keyboard.isDown("right") then square.x = 10 + 40 * dt end if lov...
by xNick1
Fri Dec 15, 2017 6:36 pm
Forum: Support and Development
Topic: Game with separate files tryout
Replies: 32
Views: 4262

Re: Game with separate files tryout

Now you're using the table again, so it's square.x in your draw callback etc

Please consider following a tutorial about variables and tables
by xNick1
Fri Dec 15, 2017 6:32 pm
Forum: Support and Development
Topic: Game with separate files tryout
Replies: 32
Views: 4262

Re: Game with separate files tryout

square.x = square.x + 40 * dt Step by step. Then you're gonna investigate why your code didn't work. It won't work anyway cause you're using an empty table now. square.x doesn't exist anymore. You needed it. If you don't wanna use a table you have at least to declare a variable called x and use that...
by xNick1
Fri Dec 15, 2017 6:11 pm
Forum: Support and Development
Topic: Game with separate files tryout
Replies: 32
Views: 4262

Re: Game with separate files tryout

I said "or even".
You either use square.speed or use speed and declare the variable.

Please consider using some Lua tutorial:
http://tylerneylon.com/a/learn-lua/

You won't have such issues anymore!

Nah man, love is user friendly.
It's just picky about who his friends are
by xNick1
Fri Dec 15, 2017 5:53 pm
Forum: Support and Development
Topic: Game with separate files tryout
Replies: 32
Views: 4262

Re: Game with separate files tryout

It says the second parameter you're passing is nil. So try to put 100 instead of square.x and see if it solves the problem. If it does try to print square.x to see if it's nil. Then try to understand why it's nil xD I managed to make the square appear, but I got now this: Error: square.lua:5: attem...