Image issues
Posted: Sat Oct 07, 2017 1:37 pm
Does anyone know how to fix this?
also please tell me if you see the image or not cause i cant
I was already reading the PGE wiki before you said that. And i still am. Now please let me figure out how to layout LuaImageResource.PixelPest wrote:I know I said that I wouldn't help you again unless you read a tutorial, but I will say one more thing: you're still making the same mistakes over and over again; you've done this same thing at least five times and still haven't listened to what people have told you. If you don't read a tutorial you're going to hit a point where you're unable to get any more help from people directly as you're going to have pissed off everyone who has the potential to help you. You're pretty close to that point
Misc.resolveFile accepts a filename as a string and returns a filepath as a string.TheKidCodee wrote:I was already reading the PGE wiki before you said that. And i still am. Now please let me figure out how to layout LuaImageResource.PixelPest wrote:I know I said that I wouldn't help you again unless you read a tutorial, but I will say one more thing: you're still making the same mistakes over and over again; you've done this same thing at least five times and still haven't listened to what people have told you. If you don't read a tutorial you're going to hit a point where you're unable to get any more help from people directly as you're going to have pissed off everyone who has the potential to help you. You're pretty close to that point
Ok. But whats a LuaImageResource? now i know its not a filepathThe0x539 wrote:Misc.resolveFile accepts a filename as a string and returns a filepath as a string.TheKidCodee wrote:I was already reading the PGE wiki before you said that. And i still am. Now please let me figure out how to layout LuaImageResource.PixelPest wrote:I know I said that I wouldn't help you again unless you read a tutorial, but I will say one more thing: you're still making the same mistakes over and over again; you've done this same thing at least five times and still haven't listened to what people have told you. If you don't read a tutorial you're going to hit a point where you're unable to get any more help from people directly as you're going to have pissed off everyone who has the potential to help you. You're pretty close to that point
Graphics.loadImage accepts a filepath as a string and returns a LuaImageResource.
Graphics.drawImage accepts a LuaImageResource and coordinates and draws the image at that location.
LuaImageResource is, as far as you should be concerned, a type, just like boolean/number/table/function. Technically it's userdata, or in B4 a table, but for your purposes just think of it as a type of its own.TheKidCodee wrote:Ok. But whats a LuaImageResource? now i know its not a filepathThe0x539 wrote:Misc.resolveFile accepts a filename as a string and returns a filepath as a string.TheKidCodee wrote: I was already reading the PGE wiki before you said that. And i still am. Now please let me figure out how to layout LuaImageResource.
Graphics.loadImage accepts a filepath as a string and returns a LuaImageResource.
Graphics.drawImage accepts a LuaImageResource and coordinates and draws the image at that location.
The0x539 wrote:LuaImageResource is, as far as you should be concerned, a type, just like boolean/number/table/function. Technically it's userdata, or in B4 a table, but for your purposes just think of it as a type of its own.TheKidCodee wrote:Ok. But whats a LuaImageResource? now i know its not a filepathThe0x539 wrote: Misc.resolveFile accepts a filename as a string and returns a filepath as a string.
Graphics.loadImage accepts a filepath as a string and returns a LuaImageResource.
Graphics.drawImage accepts a LuaImageResource and coordinates and draws the image at that location.
Code: Select all
function onInputUpdate()
Graphics.loadImage("Hudpics\\score.png")
endTheKidCodee wrote:The0x539 wrote:LuaImageResource is, as far as you should be concerned, a type, just like boolean/number/table/function. Technically it's userdata, or in B4 a table, but for your purposes just think of it as a type of its own.TheKidCodee wrote: Ok. But whats a LuaImageResource? now i know its not a filepathCode: Select all
function onInputUpdate() Graphics.loadImage("Hudpics\\score.png") end
Code: Select all
function onNPCKill()
8 + 3
end
Get serious.The0x539 wrote:TheKidCodee wrote:The0x539 wrote: LuaImageResource is, as far as you should be concerned, a type, just like boolean/number/table/function. Technically it's userdata, or in B4 a table, but for your purposes just think of it as a type of its own.Code: Select all
function onInputUpdate() Graphics.loadImage("Hudpics\\score.png") endCode: Select all
function onNPCKill() 8 + 3 end
Code: Select all
local Hudscore = Graphics.loadImage(Misc.resolveFile(HUDpics/score))HUDpics/score should be enclosed in quotes and have a file extension. Right now it's interpreting HUDpics as a variable and score as a variable, and trying to divide HUDpics by score. With quotes, it'll be interpreted as the string of text that you mean for it to be.TheKidCodee wrote:I dont rememeber it that much so chances are some of the mistakes i made here might not in my actual code. I cant go and check right nowCode: Select all
local Hudscore = Graphics.loadImage(Misc.resolveFile(HUDpics/score))
I was back hours ago but i didnt come to the fourms. This is what it actually looks like.The0x539 wrote:HUDpics/score should be enclosed in quotes and have a file extension. Right now it's interpreting HUDpics as a variable and score as a variable, and trying to divide HUDpics by score. With quotes, it'll be interpreted as the string of text that you mean for it to be.TheKidCodee wrote:I dont rememeber it that much so chances are some of the mistakes i made here might not in my actual code. I cant go and check right nowCode: Select all
local Hudscore = Graphics.loadImage(Misc.resolveFile(HUDpics/score))
That aside, this is some of the most correct LunaLua code you've ever written.
Code: Select all
local hudscore = Graphics.loadImage(Misc.resolvefile("HUDpics/score.png))You're missing one thing (you started something but never ended itTheKidCodee wrote:I was back hours ago but i didnt come to the fourms. This is what it actually looks like.The0x539 wrote:HUDpics/score should be enclosed in quotes and have a file extension. Right now it's interpreting HUDpics as a variable and score as a variable, and trying to divide HUDpics by score. With quotes, it'll be interpreted as the string of text that you mean for it to be.TheKidCodee wrote:I dont rememeber it that much so chances are some of the mistakes i made here might not in my actual code. I cant go and check right nowCode: Select all
local Hudscore = Graphics.loadImage(Misc.resolveFile(HUDpics/score))
That aside, this is some of the most correct LunaLua code you've ever written.you think you post something but you actually didnt godamnitCode: Select all
local hudscore = Graphics.loadImage(Misc.resolvefile("HUDpics/score.png))
The0x539 wrote:You're missing one thing (you started something but never ended itTheKidCodee wrote:I was back hours ago but i didnt come to the fourms. This is what it actually looks like.The0x539 wrote: HUDpics/score should be enclosed in quotes and have a file extension. Right now it's interpreting HUDpics as a variable and score as a variable, and trying to divide HUDpics by score. With quotes, it'll be interpreted as the string of text that you mean for it to be.
That aside, this is some of the most correct LunaLua code you've ever written.you think you post something but you actually didnt godamnitCode: Select all
local hudscore = Graphics.loadImage(Misc.resolvefile("HUDpics/score.png))
Code: Select all
local hudscore = Graphics.loadImage(Misc.resolvefile("HUDpics/score.png"))This is valid, correct, and good practice, assuming the file exists. hudscore is now a variable ready to be fed into a function from the Graphics.draw family.TheKidCodee wrote:The0x539 wrote:You're missing one thing (you started something but never ended itTheKidCodee wrote: I was back hours ago but i didnt come to the fourms. This is what it actually looks like.you think you post something but you actually didnt godamnitCode: Select all
local hudscore = Graphics.loadImage(Misc.resolvefile("HUDpics/score.png))*Again What it Actually looks like.Code: Select all
local hudscore = Graphics.loadImage(Misc.resolvefile("HUDpics/score.png"))
Will it show?The0x539 wrote:This is valid, correct, and good practice, assuming the file exists. hudscore is now a variable ready to be fed into a function from the Graphics.draw family.TheKidCodee wrote:The0x539 wrote: You're missing one thing (you started something but never ended it*Again What it Actually looks like.Code: Select all
local hudscore = Graphics.loadImage(Misc.resolvefile("HUDpics/score.png"))
It will show if you draw it in one of the main event loop callbacks.TheKidCodee wrote:Will it show?The0x539 wrote:This is valid, correct, and good practice, assuming the file exists. hudscore is now a variable ready to be fed into a function from the Graphics.draw family.TheKidCodee wrote:*Again What it Actually looks like.Code: Select all
local hudscore = Graphics.loadImage(Misc.resolvefile("HUDpics/score.png"))
im sorry?The0x539 wrote:It will show if you draw it in one of the main event loop callbacks.TheKidCodee wrote:Will it show?The0x539 wrote: This is valid, correct, and good practice, assuming the file exists. hudscore is now a variable ready to be fed into a function from the Graphics.draw family.