I get that error whenever I run:Runtime Error!
Program: C:\Program Files\LOVE\love.exe
This application has requested the Runtime in an unusual way.
Please contact the application's support team for more information.
Code: Select all
function draw(object,X,Y,rotation,flipx,flipy) --ENUM, number, number, number, bool, bool
height=object:getHeight()
width=object:getHeight()
love.graphics.draw(object, X + width/2, Y + height/2, math.rad(rotation), flipx and -1 or 1, flipy and -1 or 1, width/2, height/2)
end
function rite(str)
love.graphics.print(str,0,line*13)
line=line + 1
end
function loadentitydata()
npcs={}
love.filesystem.load("config.txt")()
end
function loadmap()
mapdata=love.image.newImageData("Map.png")
num=0
map = {}
for y = 1,mapdata:getHeight() do
for x = 1,mapdata:getWidth() do
r,g,b,a = mapdata:getPixel(x,y)
if r == 255 and g == 128 and b == 0 then
map[x..":"..y] = "lava"
elseif r == 0 and g == 0 and b == 255 then
map[x..":"..y] = "water"
elseif r == 0 and g == 255 and b == 0 then
map[x..":"..y] = "grass"
elseif r == 156 and g == 90 and b == 60 then
map[x..":"..y] = "dirt"
elseif r == 100 and g == 100 and b == 100 then
map[x..":"..y] = "stone"
elseif r == 200 and g == 200 and b == 200 then
map[x..":"..y] = "cobble"
elseif r == 200 and g == 255 and b == 200 then
map[x..":"..y] = "mcobble"
elseif r == 0 and g == 100 and b == 0 then
map[x..":"..y] = "slime"
elseif r == 255 and g == 255 and b == 255 then
map[x..":"..y] = "wood"
end
end
end
end
function love.load()
Character=love.graphics.newImage("Textures\/Sprite.png")
tiles={}
tiles["grass"]=love.graphics.newImage("Textures\/Grass.png")
tiles["lava"]=love.graphics.newImage("Textures\/Lava.png")
tiles["wood"]=love.graphics.newImage("Textures\/Planks.png")
tiles["water"]=love.graphics.newImage("Textures\/Water.png")
tiles["dirt"]=love.graphics.newImage("Textures\/Dirt.png")
tiles["slime"]=love.graphics.newImage("Textures\/Slime.png")
tiles["mcobble"]=love.graphics.newImage("Textures\/MossyCobble.png")
tiles["cobble"]=love.graphics.newImage("Textures\/Cobble.png")
loadmap()
loadentitydata()
game()
end
function game()
function love.draw()
love.graphics.print("Hi",0,0)
end
end