1. Hey! Guest! The 31st GMC Jam will take place between Nov 16th, 12:00 UTC (Friday noon) and Nov 26th, 12:00 UTC (Monday noon). Why not join in! Click here to find out more!
    Dismiss Notice

'Unknown function' error?

Discussion in 'Programming' started by Blue Bee, Nov 8, 2018.

  1. Blue Bee

    Blue Bee Member

    Joined:
    Nov 6, 2018
    Posts:
    5
    Hey all, I was trying to get my fullscreen working properly so I watched Pixelated_Pope's video about it (https://forum.yoyogames.com/index.p...d-aspect-ratio-management-for-gms1-gms2.7106/), I did exactly what he did but for some reason I get this error: Object: obj_display_manager Event: Step at line 13 : unknown function or script room_set_view

    This is the whole thing:

    ideal_width=0;
    ideal_height=256;

    ideal_width=round(ideal_height*aspect_ratio);

    if(ideal_width & 1)
    ideal_width++;

    for(var i=1; i<=room_last; i++)
    {
    if(room_exists(i))
    {
    room_set_view(i,0,true,0,0,ideal_width,ideal_height,0,0,ideal_width,ideal_height,0,0,0,0,-1);
    room_set_view_enabled(i,true);
    }
    }

    surface_resize(application_surface,ideal_width,ideal_height);
    window_set_size(ideal_width,ideal_height);

    room_goto(room_next(room))
     
  2. Pyxus

    Pyxus Member

    Joined:
    Nov 6, 2016
    Posts:
    159
    I assume you're using GMS2. Views have actually be removed so that function is now obsolete. room_set_camera is basically the same in principle but you'd need to use the new camera system for it to actually work.
     
  3. Blue Bee

    Blue Bee Member

    Joined:
    Nov 6, 2018
    Posts:
    5
    Oh okay, thanks for clearing this up.
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice