Alyxx
Member
After a recent update, Game Maker Studio has given me errors I never received before, and acting strangely.
Now when I exit out of fullscreen mode and run my script for resizing the window, it gets stuck in some kind of loop of resizing the window, causing it to get really big and constantly flash.
My script for resizing the window:
Also, it keeps giving me errors when I try to load my game and run a DS Map check for my objects since I'm storing their state in the save file. The specific error for pretty much every object is:
ds_map_find_value argument 1 incorrect type (undefined) expecting a Number (YYGI32)
I have the following code in the creation event of each object that I want to change the state of:
ctrl_GameState Create event:
The scr_GameStateGetKey script:
I have no idea why this isn't working as it used to work perfectly before the update...
Now when I exit out of fullscreen mode and run my script for resizing the window, it gets stuck in some kind of loop of resizing the window, causing it to get really big and constantly flash.
My script for resizing the window:
GML:
function scr_ScreenMode() {
if (global.display_mode = 0)
{
window_set_fullscreen(false);
if global.dos_aspect_ratio = 0
{
window_set_size(320,200);
surface_resize(application_surface,320,200);
}
if global.dos_aspect_ratio = 1
{
window_set_size(320,240);
surface_resize(application_surface,320,240);
}
}
if (global.display_mode = 1)
{
window_set_fullscreen(false);
if global.dos_aspect_ratio = 0
{
window_set_size(640,400);
surface_resize(application_surface,640,400);
}
if global.dos_aspect_ratio = 1
{
window_set_size(640,480);
surface_resize(application_surface,640,480);
}
}
if (global.display_mode = 2)
{
window_set_fullscreen(false);
if global.dos_aspect_ratio = 0
{
window_set_size(1280,800);
surface_resize(application_surface,1280,800);
}
if global.dos_aspect_ratio = 1
{
window_set_size(1280,960);
surface_resize(application_surface,1280,960);
}
}
if (global.display_mode = 3)
{
if global.dos_aspect_ratio = 0
{
window_set_fullscreen(true);
surface_resize(application_surface,1280,800);
gpu_set_tex_filter(true);
}
if global.dos_aspect_ratio = 1
{
window_set_fullscreen(true);
surface_resize(application_surface,1280,960);
gpu_set_tex_filter(true);
}
}
}
ds_map_find_value argument 1 incorrect type (undefined) expecting a Number (YYGI32)
I have the following code in the creation event of each object that I want to change the state of:
GML:
key = scr_GameStateGetKey();
var _game_state = ds_map_find_value(ctrl_GameState.game_state,key);
if(!is_undefined(_game_state) && _game_state==false)
instance_destroy();
else
;
GML:
/// @description Create DS Map
game_state = ds_map_create();
GML:
function scr_GameStateGetKey() {
return room_get_name(room)+object_get_name(object_index)+string(x)+string(y);
}
Last edited: