Skip to main content

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

[Fixed in 1.0.40+] GMLive does't recognize macro which is inside other macro!

A topic by drindilica created Jun 16, 2019 Views: 345 Replies: 1
Viewing posts 1 to 2
(5 edits)

Hi!

I have this line of code

if (targetPickup.y <= QUADRANT_RIGHT_BOTTOM_Y_MIDDLE) {

GMLive gives me this erorr:

live][16:13:47] Runtime error: macro:QUADRANT_RIGHT_BOTTOM_Y_MIDDLE[L1,c39] `100276` (obj_mp_ball) does not have a variable `QUADRANT_RIGHT_BOTTOM_Y_MIN`

Apparently GMLive thinks that QUADRANT_RIGHT_BOTTOM_Y_MIN is an instance variable of the current object (obj_mp_ball).

This is the definition of the macros:

#macro QUADRANT_RIGHT_BOTTOM_Y_MIN 670
#macro QUADRANT_RIGHT_BOTTOM_Y_MAX 970
#macro QUADRANT_RIGHT_BOTTOM_Y_MIDDLE QUADRANT_RIGHT_BOTTOM_Y_MIN+((QUADRANT_RIGHT_BOTTOM_Y_MAX-QUADRANT_RIGHT_BOTTOM_Y_MIN)/2)

Apparently GMLive doesn't like macros which are defined via other macros !

Can this be fixed somehow?

Thank you!

Developer

It should support nested macros so long as the earlier used macros are defined above the later used macros (that use them). I'll take a look