Skip to main content

On Sale: GamesAssetsToolsTabletopComics
Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

init_system not set before reading it

A topic by Deklaration created May 06, 2022 Views: 176 Replies: 2
Viewing posts 1 to 3

Hey,

Bought this a few hours ago and am trying my best to get it to work. I call 

pal_swap_init_system(shd_pal_swapper,shd_pal_html_sprite,shd_pal_html_surface);

right at the beginning of my game, and keep getting this code error:

Variable <unknown_object>.pal_swap_init_system(100072, -2147483648) not set before reading it.  at gml_Object_oController_Create_0 (line 1) - pal_swap_init_system(shd_pal_swapper,shd_pal_html_sprite,shd_pal_html_surface);</unknown_object>

Not sure what I need to set when the script itself exists to set variables. Seen this happen once before, and that was when they switched up how scripts work. But this seems to be updated just fine. Would really appreciate a hand!

Developer

Whenever you see "<unknown_object>." 99% of the time, that's a 2.3 issue.  You have a script file that doesn't have "function <functionName>(<arguments>){" at the top like you should for all script resources on the most recent version of GameMaker

Thanks for the help! Great to know what unkown_object means. Works as it should now.