Search found 1 match

by DarkblooM
Fri Sep 20, 2024 9:48 pm
Forum: Support and Development
Topic: Error: attempt to index a nil value
Replies: 0
Views: 57

Error: attempt to index a nil value

Hello. I'm taking my first steps into using LÖVE and I'm running into an issue that I can't quite identify. Here's my main.lua: Player = { pos = {0, 0}, speed = 0 } function Player.new(pos, speed) local self = setmetatable({}, Player) self.pos = pos or {0, 0} self.speed = speed or 300 end function l...