Page 1 of 1

I got this Error what do I do?

Posted: Wed May 07, 2014 2:05 am
by Twigy1
Help please I don't know how to fix it!

Re: I got this Error what do I do?

Posted: Wed May 07, 2014 2:20 am
by BoopDeePoop
I believe it's just trying to say that it can't find entities.lua. What does your line 2 look like?

Re: I got this Error what do I do?

Posted: Wed May 07, 2014 2:41 am
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

Re: I got this Error what do I do?

Posted: Wed May 07, 2014 2:49 am
by HugoBDesigner
Use just this:

Code: Select all

require "entities"

Re: I got this Error what do I do?

Posted: Wed May 07, 2014 4:09 am
by Twigy1
Thank you guys so much you helped a lot, I'm just beginner at coding I really appreciate it.