polymod icon indicating copy to clipboard operation
polymod copied to clipboard

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

Open 7oltan opened this issue 1 year ago • 2 comments

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!!

7oltan avatar Jul 06 '24 23:07 7oltan

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?

EliteMasterEric avatar Jul 07 '24 08:07 EliteMasterEric

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

7oltan avatar Jul 08 '24 16:07 7oltan