Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags

GMLive.gml

Livecoding for GameMaker: Studio / GameMaker Studio 2 · By YellowAfterlife

Bug with array_get_index

A topic by Jammy Productions created 92 days ago Views: 87 Replies: 3
Viewing posts 1 to 4

GMLive won't reload because it says:
`array_get_index` requires at least 4 arguments, got 2

However, only 2 values are required for array_get_index. There are 2 additional optional values, but I don't need either of them for what I'm doing. I've tried reloading gamemaker, reloading GMLive itself, running in normal, and running in debug.

Developer

You can override the signature with live_function_add - I rely on fnames definitions for these, which can be off.

I didn't know that was possible, thanks! I've never used it before, though. Would you be able to give me an example? I.e., where would I put the function?

Developer(+1)

At the end of obj_gmlive’s Create, like so

live_function_add("array_get_index(array,value,?offset,?length)", array_get_index);