Calling parent
Okay, I know you can call parent on a function in a package, but can you do the same with a script?
Main reason, I want to edit a script in another script, without messing with the original. I know I could just place a new one into the mod folder, but I would rather just edit it within an autoexeced script. Anyway to do this without some weird and complicated code?
Main reason, I want to edit a script in another script, without messing with the original. I know I could just place a new one into the mod folder, but I would rather just edit it within an autoexeced script. Anyway to do this without some weird and complicated code?
Comments
If that isn't what you meant, I'll take another look.
If you do mean that I can't call parent on a script at all, dangit......
This code
would result in the following echoed to the console:
On a side note, after you create the first object "linking" the namespaces Foo and Block, you can also call Block::Bar() and get the same results.
Otherwise, you get an unknown command warning echoed to the console.
If you want to "include" various script into another, parent and packages don't do that.
The parent keyword simply jumps to the parent frame of reference (in a package, that's the function you've wrapped; in a class method, that's the parent/super class version of the method) and then returns back to the calling frame of reference.
If it's your script, you have two choices: