@chrissstrahl Reborn uses try catch in it's code (in the gamex wrapper), but what I was referencing was to see if try\catch is also a stock command that can be used with MOHAA scripts(with or without Reborn).
@Ryback, I get what you mean now with cluttered code. I don't think using try/catch like that would be very ideal either. It would be extremely tedious, what I would do is only put it in main functions or loops where you're executing stuff.
EDIT:
Also, I just had a thought... I don't know if this is possible but let me try to explain my theory...
In mohaa there are several mods that use common files like mikes torso, legs, dmprecache (just to name a few). This is probably the single most probable cause of mod incompatibility when there are servers running multiple mods...
I had an issue like this when I was making something in powershell...
What I did was instead of trying to modify an existing file, I wrote a code block that "executes what I need" without touching the original file.
What I am suggesting is this...
Instead of modifying the original dmprecache file to execute your code can something like this be done..
1. Read the contents of the original precache file (maybe this isn't even needed (not sure))
2. Append a code block from within your script to "exec my\folder\path\myScript.scr"
3. And let it execute on the fly from there
I'm not sure if this is possible, but it was just another crazy thought I had.
I am not sure if that can be done just by scripting, but I doubt it.
It would be pretty unreliable because someone else might have modified the code...
I know of these parm queries and how they are being used, does anyone know a few more and in what relation they are ?
parm.other
parm.owner
parm.movefail
parm.movedone
parm.previousthread
It relates to a group of threads. So if a thread is created within another thread they are then part of the same group scope. Not particularly useful most of the time, or should I say I've not really seen a need for it much.
Last edited by 1337Smithy; July 10th, 2018 at 03:35 PM.
Oh I'm sure there are good use cases, I just don't use it much in the stuff I've worked on. I know I've seen it used by jv_map in his stuff like the flying mod etc... It's not common though.
Yeah, I haven't looked in that script for a while but I guess it's used just as the level scope would be? It is useful though as it keeps that script contained and doesn't conflict with the rest of your level and means you don't have to paramaterise your functions.
Last edited by 1337Smithy; July 11th, 2018 at 01:58 PM.
I think it is used in a different context here and has to do with ai grouping, but I did not really take time to check it out, because I was compiling a list.
I have updated the document again, added loops (for and while).
And I have included examples for continue and break.
Not very good examples but I guess they will do
As always feedback is welcome.
Last edited by chrissstrahl; March 14th, 2019 at 01:30 AM.