I got this Error what do I do?

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.
Post Reply
Twigy1
Prole
Posts: 4
Joined: Wed May 07, 2014 2:01 am

I got this Error what do I do?

Post by Twigy1 »

Help please I don't know how to fix it!
Attachments
Error.png
Error.png (394.09 KiB) Viewed 3130 times
User avatar
BoopDeePoop
Prole
Posts: 39
Joined: Sun Dec 30, 2012 4:15 am

Re: I got this Error what do I do?

Post by BoopDeePoop »

I believe it's just trying to say that it can't find entities.lua. What does your line 2 look like?
Twigy1
Prole
Posts: 4
Joined: Wed May 07, 2014 2:01 am

Re: I got this Error what do I do?

Post by Twigy1 »

This is basically what i have on my main.lua

Code: Select all

function love.load()
	require("entities.lua")
	ents.Startup()
	love.graphics.setBackgroundColor( 255, 255, 255 )
	xcloud = 0
	imageCloud = love.graphics.newImage("textures/cloud.png")
	imageGround = love.graphics.newImage( "textures/ground.png" )
	imageEnemy_1 = love.graphics.newImage( "textures/enemy1.png" )
	imageEnemy_2 = love.graphics.newImage( "textures/enemy2.png" )
	
	local boxEnt = ents.Create( "box", 128, 128 )
	local boxEnt2 = ents.Create( "box", 256, 128 )
	boxEnt2:setSize( 64, 128 )
end

function love.draw()
	local x = love.mouse.getX( )
	local y = love.mouse.getY( )
	
	love.graphics.setColor( 179, 255, 255, 255 )
	love.graphics.rectangle( "fill", 0, 0, 800, 300 )
	
	love.graphics.setColor( 255, 255, 255, 255 )
	love.graphics.draw( imageCloud, xcloud - 256, 128, 0, 1, 1, 0, 0 )
	
	love.graphics.setColor( 103, 164, 21, 255 )
	love.graphics.rectangle( "fill", 0, 300, 800, 300 )
	
	love.graphics.setColor( 255, 255, 255, 255 )
	love.graphics.draw( imageGround, (800-1024)/2, 300-64, 0, 1, 1, 0, 0 )
	
	ents:draw()
end

function love.update(dt)
	xcloud = xcloud + 32*dt
	if xcloud >= (800 + 256) then
		xcloud = 0
	end
	ents:update(dt)
end

function love.focus(bool)

end

function love.keypressed( key, unicode )

end

function love.keyreleased( key, unicode )

end

function love.mousepressed( x, y, button )

end

function love.mousereleased( x, y, button )

end

function love.quit()

end
User avatar
HugoBDesigner
Party member
Posts: 403
Joined: Mon Feb 24, 2014 6:54 pm
Location: Above the Pocket Dimension
Contact:

Re: I got this Error what do I do?

Post by HugoBDesigner »

Use just this:

Code: Select all

require "entities"
@HugoBDesigner - Twitter
HugoBDesigner - Blog
Twigy1
Prole
Posts: 4
Joined: Wed May 07, 2014 2:01 am

Re: I got this Error what do I do?

Post by Twigy1 »

Thank you guys so much you helped a lot, I'm just beginner at coding I really appreciate it.
Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot], Semrush [Bot] and 5 guests