A strange issue

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
User avatar
Mogex
Prole
Posts: 15
Joined: Thu Dec 06, 2012 2:13 am

A strange issue

Post by Mogex »

Ok, for whatever reason, when I drag my game files over to LOVE.exe, it just does NOTHING, I mean out of the blue and when it was working earlier it just stopped working with no error window, just dragged onto love.exe, a half of second of loading then nothing.

I have no idea why the code would do this, but here it is just in case:

main

Code: Select all

require ("player")
local Quad = love.graphics.newQuad
function love.load()
 love.physics.setMeter(60)
 world = love.physics.newWorld(0, 9.81*64, true)
 player_quad()
  
 playerx = 400
 playery = 400
  
  objects = {} --Creates table "objects" sheet1.png
  objects.ground = {}
  objects.ground.body = love.physics.newBody(world, 650/2, 650-50/2) --2nd & 3rd parameter are used to anchor object.ground to fit in correct place
  objects.ground.shape = love.physics.newRectangleShape(650, 50) --Width = 650, Height = 50
  objects.ground.fixture = love.physics.newFixture(objects.ground.body, objects.ground.shape) --attach shape to body
  
  love.graphics.setBackgroundColor(25, 150, 251) --Blue background!
  --love.graphics.setMode(650, 650, false, true, 0) --set the window dimensions to 650 by 650 with no fullscreen, vsync on, and no antialiasing
end

function love.update(dt)
world:update(dt) --this puts the world into motion
player_update()
end

function love.draw()
 love.graphics.polygon("fill", objects.ground.body:getWorldPoints(objects.ground.shape:getPoints())) -- draw a "filled in" polygon using the ground's coordinates
 player_draw()

 love.graphics.setColor(255, 255, 255) -- set the drawing color to green for the ground
 end
player

Code: Select all

function player_quad() --Love.load only

sprite = love.graphics.newImage("graphics/fg4.png")
playerx = 50
playery = 50

left = {}
right = {}


		--left
			left[0] = love.graphics.newQuad(25,0,25,32,834,308);
			left[1] = love.graphics.newQuad(0,0,25,32,834,308);
			left[2] = love.graphics.newQuad(75,0,25,32,834,308);
			--left[3] = love.graphics.newQuad(96,  48, 32, 48, 128, 192);
		
		--right
			--right[0] = love.graphics.newQuad( 0,  96, 32, 48, 128, 192);
			--right[1] = love.graphics.newQuad(32,  96, 32, 48, 128, 192);
			--right[2] = love.graphics.newQuad(64,  96, 32, 48, 128, 192);
			--right[3] = love.graphics.newQuad(96,  96, 32, 48, 128, 192);
	
	--iterator = 1
	--max = 3
	--timer = 1
	--moving = false
	--direction = "down"
	
end

function player_update()

 if love.keyboard.isDown("right") then
      playerx = playerx + 15
	   end
 if love.keyboard.isDown("left") then
      playerx = playerx - 15
	   end
 if love.keyboard.isDown("up") then
      playery = playery + 15
	   end
 if love.keyboard.isDown("down") then
      playery = playery - 15
	   end

end

function player_draw()
love.graphics.setColor(255,255,255)

love.graphics.drawq(sprite, left[0], playerx, playery)
end
 
conf

Code: Select all

function love.conf(a)

a.screen.width = 800
a.screen.height = 800
a.title = -------

end
User avatar
Boolsheet
Inner party member
Posts: 780
Joined: Wed Dec 29, 2010 4:57 am
Location: Switzerland

Re: A strange issue

Post by Boolsheet »

Mogex wrote:

Code: Select all

function love.conf(a)
a.title = -------
end
This is invalid Lua. It throws an error in love.conf and LÖVE will not create a window. Always check if you get an error message in stdout. If you don't have a terminal/command prompt, save it to a file with IO redirection:

Code: Select all

path/to/love path/to/mygame > stdout.txt
Shallow indentations.
User avatar
Mogex
Prole
Posts: 15
Joined: Thu Dec 06, 2012 2:13 am

Re: A strange issue

Post by Mogex »

Boolsheet wrote:
Mogex wrote:

Code: Select all

function love.conf(a)
a.title = -------
end
This is invalid Lua. It throws an error in love.conf and LÖVE will not create a window. Always check if you get an error message in stdout. If you don't have a terminal/command prompt, save it to a file with IO redirection:

Code: Select all

path/to/love path/to/mygame > stdout.txt
Fixed! Ty :D
Post Reply

Who is online

Users browsing this forum: No registered users and 49 guests