Page 1 of 2

Image issues

Posted: Sat Oct 07, 2017 1:37 pm
by TheKidCodee
Image
Does anyone know how to fix this?
also please tell me if you see the image or not cause i cant

Re: Image issues

Posted: Sat Oct 07, 2017 2:27 pm
by The0x539
Yes, people know how to fix this. Read a tutorial.

Re: Image issues

Posted: Sat Oct 07, 2017 2:42 pm
by PixelPest
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

Re: Image issues

Posted: Sat Oct 07, 2017 5:08 pm
by TheKidCodee
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
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.

Re: Image issues

Posted: Sat Oct 07, 2017 5:59 pm
by The0x539
TheKidCodee wrote:
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
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.
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.

Re: Image issues

Posted: Sat Oct 07, 2017 11:51 pm
by TheKidCodee
The0x539 wrote:
TheKidCodee wrote:
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
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.
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.
Ok. But whats a LuaImageResource? now i know its not a filepath

Re: Image issues

Posted: Sun Oct 08, 2017 2:21 am
by The0x539
TheKidCodee wrote:
The0x539 wrote:
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.
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.
Ok. But whats a LuaImageResource? now i know its not a filepath
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.

Re: Image issues

Posted: Mon Oct 09, 2017 10:14 pm
by TheKidCodee
The0x539 wrote:
TheKidCodee wrote:
The0x539 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.
Ok. But whats a LuaImageResource? now i know its not a filepath
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")
end

Re: Image issues

Posted: Mon Oct 09, 2017 11:14 pm
by The0x539
TheKidCodee wrote:
The0x539 wrote:
TheKidCodee wrote: Ok. But whats a LuaImageResource? now i know its not a filepath
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")
end

Code: Select all

function onNPCKill()
	8 + 3
end

Re: Image issues

Posted: Thu Oct 12, 2017 10:11 pm
by TheKidCodee
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")
end

Code: Select all

function onNPCKill()
	8 + 3
end
Get serious.

Re: Image issues

Posted: Thu Oct 12, 2017 10:20 pm
by HenryRichard
For one, you're loading the same exact image every single frame. But then you're not assigning it to anything. It's like you're ordering the same thing off Amazon every day and then throwing every single one in the trash can. It's just as useful as the code snippet The0x539 posted, which is to say it's not useful in the slightest.

Re: Image issues

Posted: Sat Oct 14, 2017 3:24 pm
by TheKidCodee

Code: Select all

local Hudscore = Graphics.loadImage(Misc.resolveFile(HUDpics/score))
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 now

Re: Image issues

Posted: Sat Oct 14, 2017 4:35 pm
by The0x539
TheKidCodee wrote:

Code: Select all

local Hudscore = Graphics.loadImage(Misc.resolveFile(HUDpics/score))
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 now
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.

Re: Image issues

Posted: Sat Oct 14, 2017 8:54 pm
by TheKidCodee
The0x539 wrote:
TheKidCodee wrote:

Code: Select all

local Hudscore = Graphics.loadImage(Misc.resolveFile(HUDpics/score))
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 now
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.
I was back hours ago but i didnt come to the fourms. This is what it actually looks like.

Code: Select all

local hudscore = Graphics.loadImage(Misc.resolvefile("HUDpics/score.png))
you think you post something but you actually didnt godamnit

Re: Image issues

Posted: Sun Oct 15, 2017 12:07 am
by The0x539
TheKidCodee wrote:
The0x539 wrote:
TheKidCodee wrote:

Code: Select all

local Hudscore = Graphics.loadImage(Misc.resolveFile(HUDpics/score))
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 now
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.
I was back hours ago but i didnt come to the fourms. This is what it actually looks like.

Code: Select all

local hudscore = Graphics.loadImage(Misc.resolvefile("HUDpics/score.png))
you think you post something but you actually didnt godamnit
You're missing one thing (you started something but never ended it

Re: Image issues

Posted: Sun Oct 15, 2017 1:01 am
by TheKidCodee
The0x539 wrote:
TheKidCodee wrote:
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.
I was back hours ago but i didnt come to the fourms. This is what it actually looks like.

Code: Select all

local hudscore = Graphics.loadImage(Misc.resolvefile("HUDpics/score.png))
you think you post something but you actually didnt godamnit
You're missing one thing (you started something but never ended it

Code: Select all

local hudscore = Graphics.loadImage(Misc.resolvefile("HUDpics/score.png"))
*Again What it Actually looks like.

Re: Image issues

Posted: Sun Oct 15, 2017 1:09 am
by The0x539
TheKidCodee wrote:
The0x539 wrote:
TheKidCodee wrote: I was back hours ago but i didnt come to the fourms. This is what it actually looks like.

Code: Select all

local hudscore = Graphics.loadImage(Misc.resolvefile("HUDpics/score.png))
you think you post something but you actually didnt godamnit
You're missing one thing (you started something but never ended it

Code: Select all

local hudscore = Graphics.loadImage(Misc.resolvefile("HUDpics/score.png"))
*Again What it Actually looks like.
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.

Re: Image issues

Posted: Sun Oct 15, 2017 1:13 am
by TheKidCodee
The0x539 wrote:
TheKidCodee wrote:
The0x539 wrote: You're missing one thing (you started something but never ended it

Code: Select all

local hudscore = Graphics.loadImage(Misc.resolvefile("HUDpics/score.png"))
*Again What it Actually looks like.
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.
Will it show?
also its kinda funny you and i are the only ones here right now.

Re: Image issues

Posted: Sun Oct 15, 2017 1:19 am
by The0x539
TheKidCodee wrote:
The0x539 wrote:
TheKidCodee wrote:

Code: Select all

local hudscore = Graphics.loadImage(Misc.resolvefile("HUDpics/score.png"))
*Again What it Actually looks like.
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.
Will it show?
It will show if you draw it in one of the main event loop callbacks.

Re: Image issues

Posted: Sun Oct 15, 2017 1:23 am
by TheKidCodee
The0x539 wrote:
TheKidCodee wrote:
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.
Will it show?
It will show if you draw it in one of the main event loop callbacks.
im sorry?