peardox
Member
I've tried surrounding the @matharoo profile image example code with try ... catch around the gxc_profile_get_info call but it never actually hits the catch
I resorted to changing the image loaded event to something like this...
This, at least, puts something on the screen by loading a placeholder from datafiles/
Still get the horrid CORS stuff though which seems to indicate that the api itself is not exception-friendly or that try ... catch doesn't work properly in OperaGX
Note - the example raises a deprecation warning (use gxc_profile_get_info), which not especially helpful when that's about half of the available documentation
I resorted to changing the image loaded event to something like this...
GML:
// If the Async ID matches our sprite request
if (async_load[? "id"] == spriteRequest) {
// If the sprite was loaded successfully
if (async_load[? "status"] >= 0) {
// Set avatar sprite to the request ID. The ID of a dynamically loaded
// sprite is the same id used by the request.
global.avatar.image = spriteRequest;
} else if (async_load[? "status"] == -1) {
// Can't get image - use placeholder
global.avatar.image = sprite_add(working_directory + "placeholder.png", 1, false, false, 0, 0);
}
}
Still get the horrid CORS stuff though which seems to indicate that the api itself is not exception-friendly or that try ... catch doesn't work properly in OperaGX
Note - the example raises a deprecation warning (use gxc_profile_get_info), which not especially helpful when that's about half of the available documentation