GodotSteam: Steam.getFriendAvatar() errors.

Using a build with this module for Win10 64-bit https://github.com/godotengine/godot/commit/22ee7ba4f083fdfab1c177fcd8d921736b5a91ca / GodotSteam3: 62d03d89410b2833347b19438dedc273ab23f39e

With the following code:

func _ready():

	if(not Steam.steamInit()):
		if(not Steam.restartAppIfNecessary(480)):
			print("Game failed to launch.")
			return
		
	Steam.connect("avatar_loaded", self, "loaded_avatar")
	Steam.getFriendAvatar(Steam.AVATAR_MEDIUM)
	
func loaded_avatar(size, img_data):
	printt(size, img_data)

The game stalls and spams these errors into the console.

image

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Comments: 15 (9 by maintainers)

Most upvoted comments

I can load a volley of avatars now, so quite pleased with that. X)

Looking forward to fiddling about with this module in the coming months. I have much gratitude for your efforts on creating and maintaining this.

Scratch the earlier post remarks, looked a little deeper into the loaders, and found where the PNG loader references to.

https://github.com/godotengine/godot/blob/b16c309f82c77d606472c3c721a1857e323a09e7/drivers/png/image_loader_png.cpp#L239-L252

Nice nice. X)

Thanks for that example code, I would’ve been left scratching my head trying something like AVATAR.load_png_from_buffer(), wouldn’t of considered having to do the buffer pixel by pixel.

That load_png_from_buffer() was getting parse error (43), and not too sure, but it doesn’t look like these function references are even implemented, but haven’t looked too deeply.

https://github.com/godotengine/godot/blob/8107fc98b6ceae749b3c10e6f0432e904961867b/core/image.cpp#L2169-L2171

Yeah, the avatar function in Godot 3 is broken due to a change in the engine. But that’s solve good insight to what’s going on.

I’ll take a look at it this afternoon and see if I can fix it. Will report back!