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

Update PolymodAbstractScriptClass.hx to have "findVar" in resloveField function #174

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

7oltan
Copy link

@7oltan 7oltan commented Jul 6, 2024

i wanted to add this to help with my code of making safe scriptSet and safe scriptGet (soft coded) which is basically:
get variable if it doesnt exist return default value
but i cant do that because its not possible to check for a varaible so i added this change

thank you!!

@EliteMasterEric EliteMasterEric changed the base branch from master to develop July 7, 2024 08:42
@EliteMasterEric EliteMasterEric self-assigned this Jul 7, 2024
@EliteMasterEric
Copy link
Collaborator

Passing a VarDecl outside the hScript class is un-intuitive and risks breaking stuff.

Maybe instead a hasVar function which returns a boolean if findVar is not null would make more sense here?

@7oltan
Copy link
Author

7oltan commented Jul 8, 2024

Both work, tho I used "findFunction" and it works but idk, the hscript stuff it scares me

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.

2 participants