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

Self isn't updated properly if an Instance is created inside a with block #145

Open
Harlem512 opened this issue Jan 18, 2025 · 0 comments
Open
Labels
bug Something isn't working high priority Important

Comments

@Harlem512
Copy link
Contributor

Harlem512 commented Jan 18, 2025

What version of Catspeak are you using?

unstable (main)

What happened?

The following code creates an instance of omod while in a with block on omain while in a catspeak function call. The code prints omod (correct) and then omain (???), because it is using the with block's self instead of the setSelf self.

Objects:
oninital and omain are placed into a starting room
oinitial create Event:

Catspeak.interface.exposeEverythingIDontCareIfModdersCanEditUsersSaveFilesJustLetMeDoThis = true;
var f = Catspeak.compile(Catspeak.parseString("with omain { instance_create_depth(0, 0,0, omod) }"))
f.setSelf(self)
f()

omod create Event:

show_message(object_get_name(self.object_index))
var f = Catspeak.compile(Catspeak.parseString("show_message(object_get_name(self.object_index))"))
f.setSelf(self)
f()

omain is an empty game object.

@Harlem512 Harlem512 added bug Something isn't working high priority Important labels Jan 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working high priority Important
Projects
None yet
Development

No branches or pull requests

1 participant