Image issues

This is the place for discussion and support for LunaLua and related modifications and libraries.
Forum rules
Before you make a topic/post, consider the following:
-Is there a topic for this already?
-Is your post on topic/appropriate?
-Are you posting in the right forum/following the forum rules?
TheKidCodee
Snifit
Snifit
Posts: 234
Joined: Sun Jul 16, 2017 6:47 pm
Flair: ill teach your grandmother to suck eggs
Contact:

Image issues

Postby TheKidCodee » Sat Oct 07, 2017 1:37 pm

Image
Does anyone know how to fix this?
also please tell me if you see the image or not cause i cant

The0x539
Eerie
Eerie
Posts: 751
Joined: Fri Jan 22, 2016 8:02 pm

Re: Image issues

Postby The0x539 » Sat Oct 07, 2017 2:27 pm

Yes, people know how to fix this. Read a tutorial.

PixelPest
Raccoon Mario
Raccoon Mario
Posts: 7111
Joined: Sun Jul 12, 2015 5:38 pm
Flair: Tamer of Boom Booms
Contact:

Re: Image issues

Postby PixelPest » Sat Oct 07, 2017 2:42 pm

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

TheKidCodee
Snifit
Snifit
Posts: 234
Joined: Sun Jul 16, 2017 6:47 pm
Flair: ill teach your grandmother to suck eggs
Contact:

Re: Image issues

Postby TheKidCodee » Sat Oct 07, 2017 5:08 pm

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.

The0x539
Eerie
Eerie
Posts: 751
Joined: Fri Jan 22, 2016 8:02 pm

Re: Image issues

Postby The0x539 » Sat Oct 07, 2017 5:59 pm

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.

TheKidCodee
Snifit
Snifit
Posts: 234
Joined: Sun Jul 16, 2017 6:47 pm
Flair: ill teach your grandmother to suck eggs
Contact:

Re: Image issues

Postby TheKidCodee » Sat Oct 07, 2017 11:51 pm

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

The0x539
Eerie
Eerie
Posts: 751
Joined: Fri Jan 22, 2016 8:02 pm

Re: Image issues

Postby The0x539 » Sun Oct 08, 2017 2:21 am

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.

TheKidCodee
Snifit
Snifit
Posts: 234
Joined: Sun Jul 16, 2017 6:47 pm
Flair: ill teach your grandmother to suck eggs
Contact:

Re: Image issues

Postby TheKidCodee » Mon Oct 09, 2017 10:14 pm

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

The0x539
Eerie
Eerie
Posts: 751
Joined: Fri Jan 22, 2016 8:02 pm

Re: Image issues

Postby The0x539 » Mon Oct 09, 2017 11:14 pm

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

TheKidCodee
Snifit
Snifit
Posts: 234
Joined: Sun Jul 16, 2017 6:47 pm
Flair: ill teach your grandmother to suck eggs
Contact:

Re: Image issues

Postby TheKidCodee » Thu Oct 12, 2017 10:11 pm

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.

HenryRichard
Birdo
Birdo
Posts: 2843
Joined: Mon Dec 23, 2013 12:09 pm
Flair: Is this where I type my password?
Contact:

Re: Image issues

Postby HenryRichard » Thu Oct 12, 2017 10:20 pm

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.

TheKidCodee
Snifit
Snifit
Posts: 234
Joined: Sun Jul 16, 2017 6:47 pm
Flair: ill teach your grandmother to suck eggs
Contact:

Re: Image issues

Postby TheKidCodee » Sat Oct 14, 2017 3:24 pm

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

The0x539
Eerie
Eerie
Posts: 751
Joined: Fri Jan 22, 2016 8:02 pm

Re: Image issues

Postby The0x539 » Sat Oct 14, 2017 4:35 pm

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.

TheKidCodee
Snifit
Snifit
Posts: 234
Joined: Sun Jul 16, 2017 6:47 pm
Flair: ill teach your grandmother to suck eggs
Contact:

Re: Image issues

Postby TheKidCodee » Sat Oct 14, 2017 8:54 pm

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

The0x539
Eerie
Eerie
Posts: 751
Joined: Fri Jan 22, 2016 8:02 pm

Re: Image issues

Postby The0x539 » Sun Oct 15, 2017 12:07 am

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

TheKidCodee
Snifit
Snifit
Posts: 234
Joined: Sun Jul 16, 2017 6:47 pm
Flair: ill teach your grandmother to suck eggs
Contact:

Re: Image issues

Postby TheKidCodee » Sun Oct 15, 2017 1:01 am

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.

The0x539
Eerie
Eerie
Posts: 751
Joined: Fri Jan 22, 2016 8:02 pm

Re: Image issues

Postby The0x539 » Sun Oct 15, 2017 1:09 am

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.

TheKidCodee
Snifit
Snifit
Posts: 234
Joined: Sun Jul 16, 2017 6:47 pm
Flair: ill teach your grandmother to suck eggs
Contact:

Re: Image issues

Postby TheKidCodee » Sun Oct 15, 2017 1:13 am

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.

The0x539
Eerie
Eerie
Posts: 751
Joined: Fri Jan 22, 2016 8:02 pm

Re: Image issues

Postby The0x539 » Sun Oct 15, 2017 1:19 am

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.

TheKidCodee
Snifit
Snifit
Posts: 234
Joined: Sun Jul 16, 2017 6:47 pm
Flair: ill teach your grandmother to suck eggs
Contact:

Re: Image issues

Postby TheKidCodee » Sun Oct 15, 2017 1:23 am

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?


Return to “LunaLua”

Who is online

Users browsing this forum: No registered users and 1 guest