YoYoGames / GameMaker-Bugs

Public tracking for GameMaker bugs
26 stars 8 forks source link

In-Game: "event_object" still returns a number, not an object reference #7800

Closed backYard321 closed 1 month ago

backYard321 commented 1 month ago

Description

event_object should be returning an object asset reference, as the manual states it should

Steps To Reproduce

  1. Start GameMaker and import event_object.zip
  2. Run it (e.g., Win VM)
  3. Observe the two values drawn on-screen are reals, not references

How reliably can you recreate this issue using your steps above?

Always

Which version of GameMaker are you reporting this issue for?

2024.8.1 (Monthly)

Which platform(s) are you seeing the problem on?

Windows

Sample Package Attached?

Sample Project Added?

YYDan commented 1 month ago

The manual does not say this has been changed to be a reference yet, so it's expected to still be the object index, as documented:

https://manual.gamemaker.io/monthly/en/#t=GameMaker_Language%2FGML_Reference%2FAsset_Management%2FObjects%2Fobject_get_name.htm

backYard321 commented 1 month ago

The manual does not say this has been changed to be a reference yet, so it's expected to still be the object index, as documented:

https://manual.gamemaker.io/monthly/en/#t=GameMaker_Language%2FGML_Reference%2FAsset_Management%2FObjects%2Fobject_get_name.htm

That's the page for object_get_name() - the page for event_object says it returns "object asset" not "real". My understanding is that anything returning an object asset is always meant to return a ref, not an integer, so in that case it would be a bug.

image

https://manual.gamemaker.io/monthly/en/GameMaker_Language/GML_Reference/Asset_Management/Objects/Object_Events/event_object.htm

YYDan commented 1 month ago

Hehe, copy-paste error there - that IS the page I meant to link to ;)

Emc1923 commented 1 month ago

The HTML5 target is still returning an integer as of IDE v2024.1100.0.631 Runtime v2024.1100.0.656. Reopening for now, thanks.

stuckie commented 1 month ago

Closing as HTML5 does not support references for all things.

Emc1923 commented 1 month ago

Verified as per comment above.