Search found 3 matches

by goldenpotato
Wed Jan 27, 2021 11:56 pm
Forum: General
Topic: attempt to perform arithmetic on field 'y' (a nil value)
Replies: 5
Views: 9631

Re: attempt to perform arithmetic on field 'y' (a nil value)

Xugro wrote: Wed Jan 27, 2021 11:19 pm Please upload a .love of your game. Then we can take a look at what is going on here. Without seeing how the different classes interact we can only guess what the problem may be.
I'm unsure of how to do that. I'm pretty new to love2D and I'm still exploring many of its features.
by goldenpotato
Wed Jan 27, 2021 10:32 pm
Forum: General
Topic: attempt to perform arithmetic on field 'y' (a nil value)
Replies: 5
Views: 9631

Re: attempt to perform arithmetic on field 'y' (a nil value)

I can't really see what's wrong in your code as well. All I can think of is that you didn't call RCar:init() before using RCar:update() or something. This is my code for where I initialized all the Classes. PlayState = Class{__includes = BaseState} function PlayState:init() self.redCar = RCar() sel...
by goldenpotato
Wed Jan 27, 2021 5:15 pm
Forum: General
Topic: attempt to perform arithmetic on field 'y' (a nil value)
Replies: 5
Views: 9631

attempt to perform arithmetic on field 'y' (a nil value)

I'm not sure if this is the right forum to post this but I recently got this issue when making a "collides" function in a game I'm working on. Before this function every call to "self.y" works just fine but the moment I enable this function, love gives me the following error: ***...