Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

[Fixed in 1.0.25+; Workaround] camera_create_view bug

A topic by vortexcannon created Jun 08, 2020 Views: 391 Replies: 2
Viewing posts 1 to 3
(1 edit)

Hi!

If I use a given function in the code, for example: view_camera[0] = camera_create_view(0, 0, 1920, 1080);

Then I see an error in the output:

[live][15:59:30] Error in obj_ev_1_Loader:Step_0:
[live][15:59:30] obj_ev_1_Loader:Step_0[L284,c21] `camera_create_view` takes 10 arguments, got 4

This function requires only 4 arguments, the remaining 6 are optional. But if I do not specify them, then the script does not work, but only gives an errors.

Developer

Hi, this is an error due to formatting in the fnames file - you could open GMLAPI.gml (or GMLive_std.gml in most current versions), find camera_create_view, and replace [, arg1, arg2, ..] by ?arg1, ?arg2 or even just ...args instead of the whole optional batch.

I'll fix this for the next update (while 2.3 update will hopefully be able to use the introduced built-in function references)

Thank you! This fixed my problem :)