The "problem" code is as follows
Code: Select all
local anim8 = require "anim8"
--require "Equipment"
PlayerData = {}
PlayerData.__index = PlayerData
moving = false
dir = "down"
HeightHolder = love.graphics.getHeight()
WidthHolder = love.graphics.getWidth()
timer = 0
num = 0
--PlayerGear = EquipData.new("Toque","Winter","Snowpants","Winter","Nil")
function PlayerData.new(PlayerName, PlayerSpecies, X, Y)
local self = setmetatable({}, PlayerData)
self.Name = PlayerName
self.Species = PlayerSpecies
self.Xplayer = X
self.Yplayer = Y
self.Animations = {}
--PlayerGear:LoadEquipment()
return self
end
function PlayerData.Load_Player(self)
local PlayerFrames = love.graphics.newImage("Resources/Characters/Player/Subland.png")
local PlayGrid = anim8.newGrid(25,44,100,176,0,0,0) --This is where the error is being shown
self.Animations[1] = anim8.newAnimation(PlayGrid('1-4,1-4'),0.25)
end
The error message that I receive is as follows "Player.lua:29: attempt to index upvalue 'anim8' (a boolean value)"
Thanks ahead of time for any help you can give me.