Full reboot same issue with return results. Even though it seems the MyVar assignment seems to be working now.
- Queries
- Arma 3 Activity
- All Stories
- Search
- Advanced Search
Advanced Search
Nov 10 2024
Oct 26 2023
Ok, something weird is definitely happening. Because now the code IS executing but still not returning anything. I haven't done a reboot or anything. Just restarted Arma 3 (which I had restarted several times when I discovered my issue). I have no proof of yesterday when it wouldn't set MyVar nor return anything... I wish I had taken screenshots. But here is proof today that I cannot return a value which was half my issue yesterday.
Oct 25 2023
Oct 18 2023
In T170647#2494085, @dedmen wrote:I saw inhertiance being a problem, but it seemed simple enough to solve manually via script and I didn't have the time to make a engine side thing of that.
I only now got to read your comments from back thenReading from config can be done in a self-implemented function but, to have it natively would be awesome.
Yep, again time limitation. I intentionally didn't do what I thought would be simple to solve in script.
Sep 24 2023
I thought I had it working with 'call' instead of 'spawn' (which it does work if called unscheduled) but, you are right. Call in initPlayerLocal.sqf is scheduled. I don't know why I thought it wasn't. So if you wrap it using isNil, it does fix it as a workaround. This does need to be fixed though.
I think some sort of preprocessor would be needed. I have created a mod which can be placed at top level (like CBA) and does 'extra' stuff to sqf files which return an array formatted for hashmap objects. Not announced yet but, I dont mind people poking around or using it themselves right now. https://github.com/XPS-Group/XPS_A3/tree/main It does already do what you are looking for.
initPlayerLocal.sqf is ran as scheduled iirc. If you had wrapped it in a call block, I believe it would run that block unscheduled.
Sep 22 2023
I can confirm the error but, it seems to be related to using spawn and createhashmapobject. And it only affects the constructor... I am guessing constructor runs either scheduled or unscheduled depending on the parent scope when it should probably always be unscheduled. So, for example, using [] call { ...code... } without the uiSleep doesn't produce the error -and- I am guessing methods always work because they are 'called'. as Biki states:
Aug 31 2023
I was configured for profiling branch on the client PC and just stable branch on server. That seems to explain it. Thank you for the clarification.
Aug 30 2023
May 30 2023
On the subject of interfaces, I have been doing this exactly (prior to the new changes);
Re: rev. 150658 - you guys are awesome!
Apr 16 2023
I actually played around a bit more and came up with this example. Note, compileFinal on an array is not working for me (expecting String,Code,Hashmap). See comments in code of what I am having issue with. If I want to make sub classes, I would either have to create each array by hand or through the following unless someone has a better implementation:
Apr 15 2023
I really like this. I had already implemented using hashmaps in an OO type fashion for a project but, the main purpose was for inheritance. I am looking at changing up my project and seeing the pros/cons of using this. I like a lot of the features such as constructor/destructor and the sealed option. However, looking at my project and what I would have to change or add I run into a big con. Class definitions. I cant see a clean way to provide a simple base class and inherit from it without duplicating a bunch of class def arrays everywhere. That, or handling inserting new properties or methods to the def array in code which can break very easily. I'd type up an example but, it would become a much longer post. I hope you understand what I mean by an explosion of definitions could occur in a project. A proposed simple solution might be to allow using a hashmap as an alt definition
createhashmapobject (_baseClass merge [_newClass, true]) //true means can overwrite existing but only if valid as already implemented (e.g. not compileFinal'd, sealed, etc..)
Although child classes would be less bulky (only overriding whats needed), an even cleaner way to do it is to have class definitions in a config file and use the #str property as the type name. Reading from config can be done in a self-implemented function but, to have it natively would be awesome.