Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags

GMEdit

A high-end code editor for all things GameMaker · By YellowAfterlife

GMS (2.3.7.606) Omitting Optional Function Arguments

A topic by GentooGames created Jan 18, 2022 Views: 278 Replies: 2
Viewing posts 1 to 2

From the patch notes of the most recent GMS update (2.3.7.606):

  • Function calls can now be made with missing arguments, these are then passed as undefined and either optional arguments or the called function can handle that
  • I.e., you can now write MyFunctionCall(1,2,,,5) and get the same result as if you had written MyFunctionCall(1, 2, undefined, undefined, 5)

This feature is causing a compile time error to be thrown:
// Error in globalScript at @[<script>:<line_number>]:
// unexpected symbol "," in expression

Developer(+1)

If you compile GMEdit yourself from git, it is fixed there, but I have not yet pushed a new build out

thank you, as always, for getting to this so quickly :)