Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compiler self call support #1683

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

XdotCore
Copy link
Contributor

Resolves #1133

Description

  1. Adds support for GMS2.3+ self calls in the compiler, cherrypicked from UndertaleModTool Community Edition.

  2. Fixed an issue where sub functions in an object should be stored in a self variable without the object function name suffix.
    Example: the utmt compiler would make gml_Script_act_gml_Object_menu_chapter_btn_Create_0 be stored in self.act_gml_Object_menu_chapter_btn_Create_0 when the original game code had self.act.

Caveats

None

Notes

I've tested this with Submachine Legacy (2023.8), and the one from #1133 (2022.5)

How to Reproduce:

  1. Create a function in a GlobalScript or Object code, then call that function from another function
    image

  2. In gamemaker (I've only tested this for 2023.8), make a function in an object, then call that function from another one in the same object
    image

@XdotCore XdotCore marked this pull request as draft February 19, 2024 01:40
@Jacky720
Copy link
Contributor

Jacky720 commented Mar 5, 2024

See also #564.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Using 'self' Throws Error "Expected token kind ProcVariable, got ProcFunction"
2 participants