#arma3_scripting

1 messages · Page 557 of 1

tough abyss
#

Aite I’ll try later good thought

wispy cave
#

Is it possible to move a respawn position or do you have to remove it and make a new one at the new position?

astral dawn
#

Did you try to change position of the marker?

surreal peak
#

Since I cant access arma atm, should this piece of code work:```sqf
case !objNull: {_UAV setIdentity (name _x)}

#

mainly the !objNull, its been a while since ive done SQF and wana make sure my syntax is right

astral dawn
#

most likely not

#

! expects bool

#

you can verify with SQF-VM

#

(or verify SQF-VM sometimes 😄 )

queen cargo
#

Nope
There aint no Object variant of that operator

brazen smelt
#

I don't know if I am just being dumb but am I messing up my addaction? Seems no matter what distance I set its stuck at 50m.

bftarsenal addAction["<t color='#2ecc71'>Open Arsenal</t>", {[bftarsenal, player, false] call ace_arsenal_fnc_openBox;},[],20000, true, true, "","true", 2,false,"",""];
winter rose
#

max* 50m iirc

worn flame
#

He's trying to set it to 2 in that example. Is the iissue that the showWindow bool is set true?

winter rose
#

I don't think so

#

@brazen smelt any script error (and do you use the -showScriptErrors flag?)

brazen smelt
#

It works fine, just it seems stuck at 50 meters even when I tried to set it to like 20000 in the above as an extreme example @winter rose

winter rose
#

It's the second number, read the doc @brazen smelt

brazen smelt
#

Oooohhhh. Oof 😦

#

Read it backwards sometimes.

astral tendon
#

Any way to make the player wear the rebreather mask and goggles out of the watter?

hot kernel
#

good day gentlemen,
I want to give a new way-point to all the groups in the list,

{_x stuff}foreach allgroups in thisList;

but it definitely gives the WP to all groups in the mission instead. What's wrong?

dim terrace
#

allgroups returns all groups, in returns true/false

astral dawn
#

use arrayIntersect instead

hot kernel
#

@astral dawn will try, thanks
@dim terrace that explains nicely, thanks

spark turret
#

@hot kernel using it in a trigger?

hot kernel
#

yes

spark turret
#

Thislist contains units then. Dont know how to do it more elegantly but create an array,add all groups to it and then do a foreach

finite dirge
#

use arrayIntersect instead

hot kernel
#

I think @astral dawn was saying to filter the allgroups list by thislist with array intersect

finite dirge
#

He already got the answer to that one IR0NSIGHT.
It compares two arrays and outputs one with the items in both.

hot kernel
#

I'm still not sure about the syntax

spark turret
#
_groupList = [];
{_group = group _x;
If !(_group in _groupList) then {_groupList pushback _group}
} foreach thisList;
{Addwaypoints} foreach _groupList
#

Thats how i would do it

hot kernel
#
arr1=allgroups;
arr2=thisList;
theseGuys=arr1 arrayIntersect arr2;
finite dirge
#
{_x code} foreach (allgroups arrayIntersect thisList);
spark turret
#

Ahh thats a lot prettier

#

Isnt comparing allGroups super performance heavy?

hot kernel
#

@finite dirge , that's the one!
we all learned something! Hurray!
thanks!

astral dawn
#

{...} forEach (allGroups select {_x in _list}) is also pretty

hot kernel
#

thanks guys!

astral dawn
#

Isnt comparing allGroups super performance heavy?
depends on how often you do it 🤷 and what is performance heavy in your case

hot kernel
#

the trigger only exists for its half-second

spark turret
#

Yeah alright then

astral dawn
#

Generally the less SQF commands the better, SQF operator overhead is larger than the underlying work that it does

spark turret
#

Good to know

hot kernel
#

the trigger is called via function, does it's business and deletes

#

@astral dawn , is this more performant than arrayIntersect?

{...} forEach (allGroups select {_x in _list})

and does _list need to be defined?

astral dawn
#

is this more performant than arrayIntersect?
not sure, test yourself, most likely no

and does _list need to be defined?
Well if you are searching for all groups which are also in some array, does this some array need to be defined?

hot kernel
#

hey, those questions were rhetorical...
😉

astral dawn
#

Also, make it work first, then worry about performance

#

Well perf question didn't seem rhetorical, considering that I'm currently worrying about SQF being stupidly slow in my own code

#

What's the fastest way to multiply two arrays with numbers?

#

It takes an insane amount of time

#

like... around 200 microseconds for arrays of ~50 size??

finite dirge
#

count/apply I'd guess. Are they equal length?

astral dawn
#

yeah

#
    params ["_comp", "_compMask"];
    {
        pr _cat = _comp#_forEachIndex;
        {
            _cat set [_forEachIndex, (_cat#_forEachIndex) * _x ];
        } forEach _x;
    } forEach _compMask;
#

Well they are arrays like [[0,1,2], [1,2]] in my case, but still

finite dirge
#

Oh, yeah you need the index. Not many options then.

#

May be better to not use the index (so use count) and create a third array and append. Not sure performance wise for set and append.

astral dawn
#

Hmm... in fact, what I really need is to set value in first array to zero, if value in second array is zero, else leave it unmodified 🤔 probably then I could use some select

#

select apply and such things

hot kernel
#

no errors but no results either, tried both variations:
in trigger statement

if (_condition) exitWith {
{    _wp = _x addWaypoint [goLOC, 0]    } foreach (allgroups arrayIntersect thisList)
};
astral dawn
#

Well then dump variables with diag_log and do the usual debugging 🤷

hot kernel
#

@astral dawn , will do-- just reporting back what works

#

likely because, as we started with, thislist is units

finite dirge
#

Would make sense, so loop to get group and compare then.

hot kernel
#

@finite dirge ,
trying that now, thanks!

hot kernel
#

turns out to be much more simple to use doMove than set a WP, which functions well in this case. Still would be nice to generate an array of groups from thislist.

astral dawn
#

what is thislist? Array of units? Or array of groups?

#

I know it's some trigger thing but I have never used triggers (there is no use for them if you know how to code)

still forum
#

units

finite dirge
#

an array of objects that have been detected by the trigger

astral dawn
#
private _groups = thislist apply {group _x};
_uniqueGroups = _groups arrayIntersect _groups;

Is it what you need then?

finite dirge
#

That would fix what I sent, yes.

unique sundial
#

Is it what you need then?
I wonder if foreach group _x pushbackUnique is more efficient

hot kernel
#

I couldn't get pushback Unique to work but that doesn't say much

#

it was like this,

groupArr = [];
{groupArr pushBackUnique (group _x)} forEach thisList;
unique sundial
#

Looks ok

still forum
#

i never profiled apply/intersect vs pushBackUnique.
but pushBackUnique has to use existing array, which is unsorted, straight array. So it has to iterate over all entries to insert.
That's going O(N²) quick.
arrayIntersect could use a hashMap as intermediary (although it most likely doesn't)

hot kernel
#

well we're already way over my head so I'm going to,

{makeDinner _x}forEach (hungry kids);

thanks for all your help!

queen cargo
#

Why is pushbackunique o(n2) 🤨

#

Should only require a single run above All entries

unique sundial
#

For each thisList

dreamy kestrel
#

Q: when working with AI skill, do all AI have the enumerated skill names?

dreamy kestrel
#

along these lines working with skill or setSkill, it says unitName is that a name? or the unit object itself?

#

then are we talking about a qualitative setting, i.e. aimingAccuracy, endurance, to name a couple, can be set from 0 to 1?

#

then how does general get divied up among the specific skills? never mind an overall skill level?

#

how do you engage the simple skill level? or the precision level of an AI unit?

exotic flax
#

That page explains exactly how to set it, which subskills are available and when it doesn't work

#

And yes, using the skill scripts are per unit/group by using the name of the unit (or group leader).
For global settings you can use the difficulty sliders (for SP) or skill sliders (missions).

dreamy kestrel
#

I question "unitName" because the docs indicate unitName: Object, Object, and virtually every other API that is there dealing with unit this, that, or the other, is on the unit Object.

#

and yet setSkill is on the unit: Object.

exotic flax
#

As far as I can see it's just the internal variable name for the unit object, so nothing to worry about

dreamy kestrel
#

and the examples seem consistent with the Object motif, i.e. _myCourage = player skill "courage", so maybe the docs are just an oversight.

exotic flax
#

Because technically player is an unit object and unit_name a unit name ;)
But they will both work

dreamy kestrel
#

or _skill = skill unit1;

exotic flax
#

The docs seem right to me, just inconsistent naming in the functions themselves

dreamy kestrel
#

or i.e. (units group player) select { !(isPlayer _x) }

#

(units group player) select { !(isPlayer _x) } select 0

#

anyway, we'll tinker some, just want to clarify the docs a bit.

exotic flax
#

First returns all AI units in group of player.
Second returns first AI unit in group of player.

#

Nothing wrong with those examples

dire barn
#

Hi, I'm extremely new to Arma scripting. Like, I don't know how to use the init. I don't expect anyone to teach me personally from the ground up, but if someone has a link to a start up guide that is up to date, I would appreciate it!

exotic flax
#

Well, the wiki is a great source of what is possible and how it all works.
There are also some guides on the forums, but it's impossible to teach someone to code with just a guide.

dreamy kestrel
#

To be clear, it is not "unitName" but rather "unit" that should be indicated in the skill documentation.

#

unitName is incorrect, does not work.

dreamy kestrel
#

_speaker is not null, it may be nil. although how it got that way between lines 136 and 140 is not clear. maybe !isNil "_speaker" is a better test?

dreamy kestrel
#

Q: I am trying to set unit skill levels on init using CBA_fnc_addClassEventHandler for the CAManBase class and when typeOf _civ in civilians. the block of code is being reached and should be setting the setSkill accordingly.

#

however, when I check skill afterwards, I see a default 0.5. I am also running ACE, in addition to CBA. I wonder if ACE is doing something there? or whether there is a better event I can watch? or I just need to configure ACE differently?

exotic flax
#

I know that ACE has a skill module in Zeus to update AI globally, which by default sets everything to 0.5

#

although that shouldn't trigger by itself, unless you use the module

#

ahh... it might do right that... it updates the AI skill on PreInit, which by default is 0.5

dreamy kestrel
#

hmm, on "preinit" ? then how does my "init" event not see it and update it?

#

literally this is what I would like to do:

["CAManBase", "init", {
    params ["_civ"];
    if (typeOf _civ in civilians) then {
        diag_log format ["Initializing unit type `%1´.", typeOf _civ];
        // Not using "general".
        private _level = 0.2;
        {
            _civ setSkill [_x, _level];
            diag_log format ["Initializing unit type `%1´ skill `%2´ level %3.", typeOf _civ, _x, _level];
        } forEach [
            "aimingAccuracy"    , "aimingShake"
            , "aimingSpeed"     , "endurance"
            , "spotDistance"    , "spotTime"
            , "courage"         , "reloadSpeed"
            , "commanding"      , "general"
        ];
    };
}, true, [], true] call CBA_fnc_addClassEventHandler;
#

I get the logging, but the actual levels are superseded.

#

maybe I need to spawn another handler so that it can run after any other handlers have completed?

dreamy kestrel
#

I am approaching this potentially as a class CfgAiSkill {} problem. However, again, I think the docs has a typo.

#

w, x, and y are minInputSkillLimit, resultingSubSkillLowerBoundary and maxInputSkillLimit. Tracking so far.

#

however, how can z be resultingSubSkillLowerBoundary? isn't that the resultingSubSkillUpperBoundary?

dreamy kestrel
#

Spawning did the trick.

dawn hull
#

this scripts is throwing a error its for exile mod
heres the script :https://pastebin.com/L05ayPXx
heres the error

 4:03:44 "ExileServer - Job with handle 10005 added."
 4:04:05 ["ExileServer - Spawning persistent vehicle spawns"]
 4:04:07 "[Display #24]"
 4:04:09 a3\data_f\proxies\flags\flag_auto.p3d: No geometry and no visual shape
 4:04:09 Error in expression <llExtension _query);
(_result select 1) select 0
>
 4:04:09   Error position: <select 0
>
 4:04:09   Error Generic error in expression
 4:04:09 File Exile_Server_Overrides\ExileServer_system_database_query_insertSingle.sqf..., line 17```
anyhelp fixing it would be super awesome
winter rose
#

Seems that (_result select 1) does not return an array of at least two elements

still forum
#

I assume _result = x callextension y?
then a select 1 makes no sense, unless y is array, where it still makes no sense.
Need to see atleast one more line of code

#

it might be that unknown parseSimpleArray bug that I've also seen in CBA. but noone so far has been able to provide any useful data (aka the input string given to parseSimpleArray) for that problem.
If noone can provide data, it will most likely not be fixed in the hotfix. meaning it'll stay for a couple months probably

unique sundial
#

The error is not for the script on pastebin

cursive whale
#

anyone good with 3d math around? feel like this should be simple but my mind is blank. given a surface normal (unit vector) how would i arrive at a 0.00-1.00 value based on the degree to which the surface is horizontal (0.00) or vertical (1.00).

unique sundial
#

Try acos vectorCos

#

Or just vectorCos

astral dawn
#

Just check vertical component of the vector ?

#

abs (_surfaceNormal#2)

#

@cursive whale

cursive whale
#

thanks both, seems too simple sparker but i guess that makes perfect sense

astral dawn
#

Actually no, might want to 1 - (abs (_surfaceNormal#2))

#

If you need it to be 0 for a flat surface, since for a flat surface the normal vector is perfectly vertical

#

Doing cos(angle between vertical axis and our normal vector) will yield the same result actually. Because if you think of it, vertical component is equal to cos of that angle anyway

cursive whale
#

trying (10-minute compile), thanks

high silo
#

So im trying to get the respawn menu loadout to work, Im using loadouts already defined in the game. However having trouble as its only showing the first one.

Inside the description.sqf I have this:

{
    class RifleBasic
    {
        vehicle = "rhsgref_ins_rifleman";
        
        vehicle = "rhsgref_ins_rifleman_akm";
        
        vehicle = "rhsgref_ins_rifleman_RPG26";
        
        vehicle = "rhsgref_ins_grenadier";

        vehicle = "rhsgref_ins_rifleman_aks74";
    
        vehicle = "rhsgref_ins_rifleman_aksu";
    };```

Inside the init.sqf I have this:
```[west,"RifleBasic"] call bis_fnc_addRespawnInventory;```

The result only show the first loadout any clue why?
https://imgur.com/a/C4lfJAV
cursive whale
#

i don't know anything about the system but that class RifleBasic just looks wrong (defining the same 'vehicle' member multiple times).

high silo
#

Should I change "vechile" for different names?

spice axle
#

Try to use a array with each string as one element

high silo
#

Could you give me a example?

still forum
#

Should I change "vechile" for different names?
no you can't just change config entry names and expect it to work
Try to use a array with each string as one element
no you can't just change config entry types and expect it to work

spice axle
#

I don’t know the system too^^

still forum
#

One respawn inventory, can only have one vehicle

cursive whale
#

it would appear you need a class for each

still forum
#

You only have one inventory "RiflemanBasic" but it looks like you want multiple. So you gotta write multiple

high silo
#

I basically want multiple options for the rifleman etc.

#

Okay, I tried that and it didn't work though

still forum
#

show what you tried

high silo
#
{
    class RifleBasic
    {
        vehicle = "rhsgref_ins_rifleman";
    };

    class RifleBasic
    {
        vehicle = "rhsgref_ins_rifleman";
    };
    
};```
#

Something like that

cursive whale
#

UI does look like each class should have a choice of loadouts but it's not clear how

still forum
#

You also can't have two classes with same name

#

give them different names

high silo
#
{
    class RifleBasic
    {
        vehicle = "rhsgref_ins_rifleman";
    };

    class RifleBasic1
    {
        vehicle = "rhsgref_ins_rifleman";
    };
    
};```
#

Like that

#

?

still forum
#

yeah

#

and then also use the new name, in a additional call to bis_fnc_addRespawnInventory

high silo
#

Do i need to update the init.sqf too then

still forum
#

I just wrote that. yes.

high silo
#
[west,"RifleBasic1"] call bis_fnc_addRespawnInventory;``` in the init.sqf
cursive whale
#

ah, each loadout needs the same 'role' (to be presented as a loadout option for that role)

high silo
#

We wrote it at the same time xD

still forum
#

🚜

high silo
#

So I added more, its now auto killing me on start and not showing any loadouts. Gonna revert back to when it worked and go from there.

cursive whale
#

as said i've not used the system but looking at the biki and your UI pic i'd guess you need something like;

#

class CfgRoles { class Rifleman { displayname = "Rifleman"; }; }; class CfgRespawnInventory { class RifleBasic01 { displayname = "AK-103"; vehicle = "rhsgref_ins_rifleman"; role = "Rifleman"; }; class RifleBasic02 { displayname = "AKM"; vehicle = "rhsgref_ins_rifleman_akm"; role = "Rifleman"; }; };

winter rose
#

```cs
class CfgRoles {
class Rifleman {
displayname = "Rifleman";
};
};
```
↓ ↓ ↓cs class CfgRoles { class Rifleman { displayname = "Rifleman"; }; };

cursive whale
#

triple accent?

winter rose
#

` yes

cursive whale
#

but not indented

winter rose
#

that's your input 😄 once between ``` you can tab in Discord

cursive whale
#

good to know but not having any joy getting tabs in (paste was tabbed, and it seems to discard those i enter in Discord

still forum
#

spaces > tabs

winter rose
#

tabs = tabs, you then adjust your IDE
space = between words

#

you press tab to have tabs, not spaces =]

cursive whale
#

tabs seem to be converted to spaces (and are present when editing) but so far i've not been able to insert any leading whitespace it will show (be they tabs or any number of consecutive space characters)

#

@astral dawn thanks, it was exactly that simple

digital hollow
#

How fitting that IDEology is the study of IDE configuration.

winter rose
#

dudes are that extremist regarding IDE preference/settings/etc

cursive whale
#

i'm super particular about source formatting, just seem to be a very visual person, dealing with other people's styling about halves my comprehension

narrow pilot
#

Heya, I am trying to create a custom faction for arma of "bandits" and as such I want them to randomise their clothing, equipment and weapons. So far I have aorted out everything except the randomised weapons.

Ive come up with a really rough script for the weapons but its inefficient and doesnt do what I want as it only allows for weapons that use the same magazine

if (isServer) then {
    _unit = _this select 0;
    _RandomWeapon = ["arifle_Mk20_ACO_pointer_F","arifle_Mk20_ACO_F","arifle_Mk20_ACO_pointer_F","arifle_Mk20_ACO_pointer_F","arifle_Mk20_ACO_F"] call BIS_fnc_selectRandom;
    _RandomMagazine = ["30Rnd_556x45_Stanag","hlc_30rnd_556x45_EPR_PMAG","hlc_30rnd_556x45_SOST_PMAG","hlc_30rnd_556x45_SPR_PMAG","hlc_30rnd_556x45_S_PMAG","hlc_30rnd_556x45_M_PMAG","hlc_30rnd_556x45_t_PMAG","hlc_30rnd_556x45_MDim_PMAG","hlc_30rnd_556x45_TDim_PMAG","hlc_30rnd_556x45_EPR_STANAGHD","hlc_30rnd_556x45_SOST_STANAGHD"] call BIS_fnc_selectRandom;

    _unit addWeapon _RandomWeapon;
    _unit addMagazine [_RandomMagazine, 8];
};
#

Ive tried this script as well as in theory it would do what I want - add random weapons along with their compatible magazine but it only selects the first sub-array in the array and because of that its useless

if (isServer) then {
    _weaponList = [
    ["arifle_Mk20_ACO_pointer_F","30Rnd_556x45_Stanag"],
    ["arifle_Mk20_ACO_F","30Rnd_556x45_Stanag"],
    ["arifle_Mk20_GL_ACO_F","30Rnd_556x45_Stanag"],
    ["LMG_Mk200_pointer_F","200Rnd_65x39_cased_Box"],
    ["srifle_EBR_MRCO_pointer_F","20Rnd_762x51_Mag"]
    ];

    _weapon = _weaponList select floor(random(count _weaponList));

    for "_i" from 0 to 4 do {
    _unit addMagazine (_weapon select 1);
    };
    
    _unit addWeapon (_weapon select 0);
};
#

Im a bit stuck and have no idea where to go from here as I am pretty inexperienced with arma scripting so absolutely any help would be appreciated. garandhead

ruby breach
#

First thing. BIS_fnc_selectRandom --> selectRandom

#
private _unit = param [0,objNull,objNull];

private _weaponsWithAmmoTypes = [
[["556_Wep_1", "556_Wep_2", "556_Wep_3"],["556_Mag_1", "556_Mag_2", "556_Mag_3"]],
[["762_Wep_1", "762_Wep_2", "762_Wep_3"],["762_Mag_1", "762_Mag_2", "762_Mag_3"]],
[["545_Wep_1", "545_Wep_2", "545_Wep_3"],["545_Mag_1", "545_Mag_2", "545_Mag_3"]],
[["9mm_Wep_1", "9mm_Wep_2", "9mm_Wep_3"],["9mm_Mag_1", "9mm_Mag_2", "9mm_Mag_3"]]
];

(selectRandom _weaponsWithAmmoTypes) params ["_weapons","_mags"];

_unit addWeapon (selectRandom _weapons);
_unit addMagazine [(selectRandom _mags),8];
unique sundial
#

matrixMultiply is awesome. If I get permission, will add 3 axis rotation function for vector dir and up

cursive whale
#

saw your video, think ppl would really appreciate a simple function to do 3d rotation (in degrees)

unique sundial
#

It is fast

cursive whale
#

vectordirandup does my head in

unique sundial
#

Yep same here because it is complex rotation

narrow pilot
#

@ruby breach cheers ill try that after work

lucid junco
#

dont you guys know if .lip files is now working in A3? i cant get it to work. I make lip file from wav (via steam tool wavetolip). Then get wav or ogg(tried both) to the .ext and when i want to say3d (or say) by unit the sound is laggy and no lipsync. Someone have experiences with this? or am i doing something wrong?

#

(wav format is 16bit, mono, 44.1 sample rate)

#

when i delete lip file sound works good

dawn hull
#
(_result select 1) select 0
>
22:31:27   Error position: <select 0
>
22:31:27   Error Generic error in expression
22:31:27 File Exile_Server_Overrides\ExileServer_system_database_query_insertSingle.sqf..., line 17```

here is the ExileServer_system_database_query_insertSingle.sqf : https://pastebin.com/1APvNjAZ

here is the script: https://pastebin.com/hBzeVcqK

if someone can fix for me that would be cool i have been at this for days
jagged elbow
#

looks like parseSimpleArray only takes a string

dawn hull
#

Jack im not a programmer could you fix this for me by any chance and explain maybe what happened please 🙂

#

i can edit a array but that's about it XD

jagged elbow
#

I am a programmer, but I don't know sqf that well. Or anything at all about exile. I just know how to spot syntax errors;

#

here's the secret

#

when it spits out a line number, the problem is usually the line before, or right before where it's pointing

dawn hull
#
_parameters = _this;
_query = [0, "SQL",_parameters] joinString ":";
_result = parseSimpleArray ("extDB3" callExtension _query);
(_result select 1) select 0```
jagged elbow
#

just copy paste "arma 3 <name of unknown function>" into google, and you'll usually get examples on how it's supposed to work

dawn hull
#

line 17 is the last line

#

so _result = parseSimpleArray ("extDB3" callExtension _query);?

jagged elbow
#

yup

#

do you know what a string is?

#

as in a programing thing

dawn hull
#

print"Helloworld"

#

lol

jagged elbow
#

exactly

#

with certain functions, the string "[1,2,3]" is the exact same thing as [1,2,3]

#

parseSimpleArray seems to be kinda special in that it requires the input to be a string

dawn hull
#

i see so no "" needed

jagged elbow
#

no you need more "

dawn hull
#

ok

#

wait a minute

#

could it be beaucse its misssing a " at the end ?

#

_result = parseSimpleArray ("extDB3" callExtension _query);

jagged elbow
#

Example 1:

_arr = parseSimpleArray "[1,2,3]";

Example 2:

_bool = true;
_num = 123.45;
_str = "ok";
_arr = [1,false,"cool"];
_res = parseSimpleArray format ["[%1,%2,%3,%4]", _bool, _num, str _str, str _arr]; 
// Note how _bool and _num do not need str, however if used anyway, the result in this case would be identical
hint str _res; // [true,123.45,"ok",[1,false,"cool"]]

from the website

dawn hull
#

right before )

finite dirge
#

Yes, the query will return a string so that's not an issue

jagged elbow
#

just took another look

dawn hull
#

ok

#

im still not understanding the format and _bool, _num, str _str, str _arr];

#

what do they do and what do they mean i guess

jagged elbow
#

Ok so @finite dirge , he's using a .dll in that line?

#

and it's known that .dll always returns a string formatted array?

finite dirge
#

He's querying the DB with extdb. It's returning an array in a string.

jagged elbow
#

ok, first time I've heard of it. thanks for the info.

#

just wanted to confirm

finite dirge
#

ExileServer_system_database_query_insertSingle.sqf
I highly doubt is the issue. What's being queried and what's being returned likely is.

dawn hull
jagged elbow
#

@dawn hull , we can try the "hammer" way of debugging by putting in sideChat str <variable> and print line by line what's goin on

#

put a player infront of that or something

#

not sure how that fairs with MP though

#

print the _result to the sideChat before the line that fails when it tries to call it

dawn hull
#

i did not make this script

jagged elbow
#

Me neither. 🙂

dawn hull
#

i just made the array how would i do that?

jagged elbow
#

sorry duder, I can just give pointers until someone more familiar with that code comes along. Might be tough to find someone who just wants to debug for a few hours and hand you back something finished, unless it's a common problem.

#

Besides, better to get your hands dirty now so you can fix it on the fly when your buddies are online

dawn hull
#

how would i " print _result to the sideChat before the line that fails when it tries to call it "

#

do i literily put_result = ["test this a if this is on then test for the script"] call BIS_fnc_guiMessage; something like that ?

#

what what line would i put this on?

jagged elbow
#

player sideChat str <array>

#

replace <array> with an array or some other variable

#

end with ;

unique sundial
#

@dawn hull diag_log _result; and post here what it logs. Whatever extension returns is not in proper format so you have error. Unless you know what it returns you can’t fix it

dawn hull
#

ok where would i put that just in the script anywhere ?

unique sundial
#

Sorry, log the result of extension call not _result

dawn hull
#

in the exile vehicle script or the ExileServer_system_database_query_insertSingle.sqf ?

#

im only seeing _result in ExileServer_system_database_query_insertSingle.sqf

#

sorry for me being a noob lol

unique sundial
#

Change _result = parseSimpleArray ("extDB3" callExtension _query); to _result = ("extDB3" callExtension _query); diag_log _result; _result = parseSimpleArray _result;

#

Then check rpt just before the error

dawn hull
#
 0:48:36 Error in expression <icles.sqf"
 

diag_log _result;
uiSleep 30;
 
diag_log ["ExileSe>
 0:48:36   Error position: <_result;
uiSleep 30;
 
diag_log ["ExileSe>
 0:48:36   Error Undefined variable in expression: _result
 0:48:36 File mpmissions\__cur_mp.Chernarus_2035\Persistent\spawn_vehicles.sqf..., line 21```
unique sundial
#

Yeah somehow you did something wrong

#

Not what I asked you

dawn hull
#

sorry i put diag_log _result; in the script file

#

ill redo it

unique sundial
#

Change what I posted to what I posted

dawn hull
#

i did that part 🙂

unique sundial
#

It cannot give undefined variable error so no you didn’t

dawn hull
#
 * ExileServer_system_database_query_insertSingle
 *
 * Exile Mod
 * www.exilemod.com
 * © 2015 Exile Mod Team
 *
 * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License.
 * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/.
 * 64Bit Conversion File Header (Extdb3) - Validatior
 */

private["_parameters","_query","_result"];
_parameters = _this;
_query = [0, "SQL",_parameters] joinString ":";
_result = ("extDB3" callExtension _query); diag_log _result; _result = parseSimpleArray _result;
(_result select 1) select 0```
#

did i not do it right ?

unique sundial
#

Yes that’s correct

dawn hull
#

rebooting let see now

#
 0:59:30 [13586,50.094,2.711,"XEH: PostInit started. MISSIONINIT: missionName=Exile, missionVersion=53, worldName=Chernarus_2035, isMultiplayer=true, isServer=true, isDedicated=true, CBA_isHeadlessClient=false, hasInterface=false, didJIP=false"]
 0:59:30 [13586,50.109,2.711,"CBA_VERSIONING: cba=3.12.2.190909, "]
 0:59:30 [13586,50.117,2.711,"XEH: PostInit finished."]
 0:59:30 "SC/BIS_fnc_log: [postInit] CBA_fnc_postInit (22.9988 ms)"
 0:59:30 "ExileServer - Main thread started"
 0:59:30 "SC/BIS_fnc_log: [BIS_fnc_preload] ----- Scripts initialized at 10106 ms -----"
 0:59:35 "ExileServer - Job with handle 10005 added."
 0:59:57 ["ExileServer - Spawning persistent vehicle spawns"]
 0:59:59 "[Display #24]"
 1:00:01 Cannot create non-ai vehicle B_APC_Tracked_02_AA_F,
 1:00:01 "SC/log: ERROR: [BIS_fnc_GUImessage] Unable to create message box"
 1:00:01 Error in expression <llExtension _query);
(_result select 1) select 0
>
 1:00:01   Error position: <select 0
>
 
 1:00:01   Error Generic error in expression
 1:00:01 File Exile_Server_Overrides\ExileServer_system_database_query_insertSingle.sqf..., line 17```
#

Cannot create non-ai vehicle B_APC_Tracked_02_AA_F,?

unique sundial
#

No "[Display #24]" probably

#

Someone stored display in database

dawn hull
#

what dose what mean exility?

unique sundial
#

Ok one more change to be sure, change that
diag_log _result;
to
diag_log "RESULT:";
diag_log _result;

#

So we know which one is the entry for result

dawn hull
#

wait what

unique sundial
#

Just add extra diag_log so we can find the correct line in rpt

dawn hull
#

like this private["_parameters","_query","_result"]; _parameters = _this; _query = [0, "SQL",_parameters] joinString ":"; _result = ("extDB3" callExtension _query); diag_log _result; diag_log "RESULT:"; _result = parseSimpleArray _result; (_result select 1) select 0

unique sundial
#

Other way round

dawn hull
#
_parameters = _this;
_query = [0, "SQL",_parameters] joinString ":";
_result = ("extDB3" callExtension _query); diag_log "RESULT:"; diag_log _result; _result = parseSimpleArray _result;
(_result select 1) select 0```
unique sundial
#

Yes

dawn hull
#

ok

#
 1:10:34 "SC/BIS_fnc_log: [BIS_fnc_preload] ----- Scripts initialized at 10469 ms -----"
 1:10:38 "ExileServer - Job with handle 10005 added."
 1:11:00 ["ExileServer - Spawning persistent vehicle spawns"]
 1:11:02 "[Display #24]"
 1:11:04 Cannot create non-ai vehicle B_APC_Tracked_02_AA_F,
 1:11:04 "SC/log: ERROR: [BIS_fnc_GUImessage] Unable to create message box"
 1:11:04 Error in expression <llExtension _query);
(_result select 1) select 0
>
 1:11:04   Error position: <select 0
>
 
 1:11:04   Error Generic error in expression
 1:11:04 File Exile_Server_Overrides\ExileServer_system_database_query_insertSingle.sqf..., line 17```
unique sundial
#

No, the script didn’t change

#

Cannot see "RESULT:" anywhere

#

Reboot

dawn hull
#

kk

#
 1:16:25 "SC/BIS_fnc_log: [BIS_fnc_preload] ----- Scripts initialized at 10152 ms -----"
 1:16:29 "ExileServer - Job with handle 10005 added."
 1:16:51 ["ExileServer - Spawning persistent vehicle spawns"]
 1:16:53 "[Display #24]"
 1:16:55 Cannot create non-ai vehicle B_APC_Tracked_02_AA_F,
 1:16:55 "SC/log: ERROR: [BIS_fnc_GUImessage] Unable to create message box"
 1:16:55 "RESULT:"
 1:16:55 "[0,""Error MariaDBStatementException1 Exception""]"
 
 1:16:55 Error in expression <SimpleArray _result;
(_result select 1) select 0
>
 1:16:55   Error position: <select 0
>
 1:16:55   Error Generic error in expression
 1:16:55 File Exile_Server_Overrides\ExileServer_system_database_query_insertSingle.sqf..., line 17```
unique sundial
#

Ah ok, parseSimpleArray is good. I know how to fix your error, give me 40 min

#

Gotta do something first

dawn hull
#

ok man thanks so much 🙂

unique sundial
#

You have database error, maybe incorrect query, can’t fix that but I can fix the result error

dawn hull
#

really you don't understand how much this help means lol been trying for days to fix it. even made a new mission.

#

ok

frozen knoll
#

for the database error check your extdb logs it might give you a clue to what may be missing from your exile.ini

dawn hull
#

@frozen knoll

extDB3: https://bitbucket.org/torndeco/extdb3/wiki/Home
extDB3: Version: 1.031
extDB3: Windows Version
Message: All development for extDB3 is done on a Linux Dedicated Server
Message: If you would like to Donate to extDB3 Development
Message: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=2SUEFTGABTAM2
Message: Also leave a message if there is any particular feature you would like to see added.
Message: Thanks for all the people that have donated.
Message: Torndeco: 18/05/15


extDB3: Found extdb3-conf.ini
extDB3: Detected 8 Cores, Setting up 6 Worker Threads
extDB3: ...
extDB3: ...
extDB3: ...
extDB3: ...
extDB3: ...
extDB3: ...


[01:16:16:666618 -05:00] [Thread 9032] extDB3: Locked
[01:16:55:480806 -05:00] [Thread 9032] extDB3: SQL: Error MariaDBStatementException1: Cannot add or update a child row: a foreign key constraint fails (`exilemod96192`.`vehicle`, CONSTRAINT `vehicle_ibfk_1` FOREIGN KEY (`account_uid`) REFERENCES `account` (`uid`) ON DELETE CASCADE)
[01:16:55:480833 -05:00] [Thread 9032] extDB3: SQL: Error MariaDBStatementException1: Input: insertVehicle:::-1:0:0:0:0:0:0:0:0:0:
frozen knoll
#

is this a fresh db?

dawn hull
#

heres the thing...

#

i originally has exile mod and the db 2 version. it was just recently i upgraded. im with gtxgaming for host

frozen knoll
#

so no uid registered to the database yet ? as in no connections to server ?

#

no successful connections *

dawn hull
#

no i can connect

#

but i have a script that i got from github. and i got someone else to edit that script for me. that script was never finished and now i have this problem above

unique sundial
#

Ok back, can you give link to original script? Not edited

dawn hull
#

sure

frozen knoll
#

The _uid variable MUST be changed to a valid UID that already exists in the account table.

#

done?

#

_uid = "76561198079956410"; // Needs to be a valid UID that exists in the account table (best to use a server owners uid)

#

is that your uid?

unique sundial
#

But this script is not what causes script error

dawn hull
#

how do i check ?

#

like uid as in how i login to the database or ?

#

i know i have to do it on the database side of things. just kind of wounding what it might be under or where it is.

unique sundial
#

The vehicles that this script generates, if they have invalid uid then when server tries to save them in DB that might cause database exception and result returned back to the script is not what is expected

dawn hull
#

here

#

76561198079956410

unique sundial
#

Yeah that uid

dawn hull
#

ok

unique sundial
#

Try it and see if exception goes away

#

Also post rpt with "RESULT:" want to see what is the expected result

dawn hull
#

Try it and see if exception goes away : the user id was already in there

#

ill get you the rpt

unique sundial
#

was it working before or is this fresh database

dawn hull
#

ill wipe it can run the server

#

that was a fresh wipe and same thing

#
 2:54:26 "ExileServer - Job with handle 10005 added."
 2:54:47 ["ExileServer - Spawning persistent vehicle spawns"]
 2:54:48 a3\data_f\proxies\flags\flag_auto.p3d: No geometry and no visual shape
 2:54:48 "SC/log: ERROR: [BIS_fnc_GUImessage] Unable to create message box"
 2:54:48 "RESULT:"
 2:54:48 "[0,""Error MariaDBStatementException1 Exception""]"
 2:54:48 Error in expression <SimpleArray _result;
(_result select 1) select 0
>
 2:54:48   Error position: <select 0
>
 2:54:48   Error Generic error in expression
 2:54:48 File Exile_Server_Overrides\ExileServer_system_database_query_insertSingle.sqf..., line 17
 2:54:49 "[Display #24]"```
unique sundial
#

what is the database engine you use, MyISAM or InnoDB?

dawn hull
#

to connect ?

unique sundial
#

no when you create table you indicate what engine to use

#

go to table properties and see which one it is

dawn hull
#

that what your looking for ?

unique sundial
#

can you show the same for vehicle

dawn hull
frozen knoll
#

also just incase... since its a fresh db did you turn off strict mode?

dawn hull
#

im sure the host dose that its

#

like all i did was click install for exile 64 bit and it dose it all

frozen knoll
#

roger

unique sundial
#

ok can you show content of vehicle table?

dawn hull
#

data ?

unique sundial
#

yeah

dawn hull
#

nothing

#

however if i start walking around on the map they will appear in the db i think

unique sundial
dawn hull
#

that was removed i wiped it remeber

#

here ill go pop into game and take another screenshot

unique sundial
#

the account entry has to exist

dawn hull
#

Meaning ?

unique sundial
#

I am not sure how you add account entry but the account table cannot be empty

dawn hull
#

its supped to form my understanding pic random vehicles spawn them on the map

still forum
#

diag_log "RESULT:";
diag_log _result;
@unique sundial I prefer to use
diag_log ["Result", _result]
That will make sure that even in scheduler its always together, and I also find array log easier to look at.
Also....... I don't understand why
parseSimpleArray "[0,""Error MariaDBStatementException1 Exception""]" will throw generic error? Looks like it should work, what am I missing?
Its valid array with number and a string?

dawn hull
#

hmm

unique sundial
#

Looks like it should work, what am I missing
nothing, it is not the error, trying to select 2 select 1 is

still forum
#

Ah I missed the second select

#

that exile code should probably have error handling. But its Exile... So no expectations about proper code should be made

dawn hull
#

so

unique sundial
#

yeah it is a combination of errors

#

the exception you get is because of key constraint, a key doesnt exist in one table so it cannot add entry to another

dawn hull
#

i just booted up the game and reeshed my db here the strange thing

unique sundial
#

It could be database misconfiguration or how the scripts are using it

dawn hull
#

vehicles are spawning from that array however only exile vehicles are making it into the db

unique sundial
#

the second error is because the result returned is not in format expected, most likely the Exile developer didnt count on error message returned instead of proper result

dawn hull
unique sundial
#

and accounts table?

dawn hull
#

"76561198079956410" \N "Gopnik" "0" "0" "0" "0" "2019-11-14 03:11:33" "2019-11-14 03:21:49" \N "3"

unique sundial
#

I prefer to use
yeah I thought about it, but have already posted, so not to confuse @still forum

#

@dawn hull you still get the error?

dawn hull
#

yes

unique sundial
#

can you show database error log again?

dawn hull
#

sure man

#
extDB3: https://bitbucket.org/torndeco/extdb3/wiki/Home
extDB3: Version: 1.031
extDB3: Windows Version
Message: All development for extDB3 is done on a Linux Dedicated Server
Message: If you would like to Donate to extDB3 Development
Message: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=2SUEFTGABTAM2
Message: Also leave a message if there is any particular feature you would like to see added.
Message: Thanks for all the people that have donated.
Message: Torndeco: 18/05/15


extDB3: Found extdb3-conf.ini
extDB3: Detected 8 Cores, Setting up 6 Worker Threads
extDB3: ...
extDB3: ...
extDB3: ...
extDB3: ...
extDB3: ...
extDB3: ...


[03:21:14:696984 -05:00] [Thread 5152] extDB3: Locked
[03:21:53:957935 -05:00] [Thread 5152] extDB3: SQL: Error MariaDBStatementException1: Cannot add or update a child row: a foreign key constraint fails (`exilemod96192`.`vehicle`, CONSTRAINT `vehicle_ibfk_1` FOREIGN KEY (`account_uid`) REFERENCES `account` (`uid`) ON DELETE CASCADE)
[03:21:53:957964 -05:00] [Thread 5152] extDB3: SQL: Error MariaDBStatementException1: Input: insertVehicle:::-1:0:0:0:0:0:0:0:0:0:
frozen knoll
#

whats insertVehicle show in your exile.ini that will tell you what it expects

dawn hull
#

kk

frozen knoll
#

and your ExileServer_object_vehicle_database_insert.sqf is it custom or original? what is that showing

dawn hull
#

custom now

frozen knoll
#

please show

grave torrent
#

@dawn hull - have you done all the over rides for extdb3?

dawn hull
#

explain over rides ? please 🙂

#

current ExileServer_system_database_query_insertSingle.sqf:

 * ExileServer_system_database_query_insertSingle
 *
 * Exile Mod
 * www.exilemod.com
 * © 2015 Exile Mod Team
 *
 * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License.
 * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/.
 * 64Bit Conversion File Header (Extdb3) - Validatior
 */

private["_parameters","_query","_result"];
_parameters = _this;
_query = [0, "SQL",_parameters] joinString ":";
_result = ("extDB3" callExtension _query); diag_log "RESULT:"; diag_log _result; _result = parseSimpleArray _result;
(_result select 1) select 0```
frozen knoll
#

not that one

#

ExileServer_object_vehicle_database_insert

dawn hull
frozen knoll
#

and as elmo said have you done all your extDB overides as exile was written for extDB2 and your using extDB3

dawn hull
#

dose not exist in Exile_Server_Overrides so its in exile_server.pbo and i have not touched that

frozen knoll
#

ExileServer_object_vehicle_database_insert.sqf is missing?

dawn hull
frozen knoll
#

its not in overides then it is in default

dawn hull
#

but my host dose it all for me

#

its just a install botton

frozen knoll
#

to my knowledge exile is to be run on extDB2

dawn hull
#

it was updated

grave torrent
#

No it isnt

dawn hull
#

like its not official

grave torrent
#

Default exile = extdb2

frozen knoll
#

unless u manually update it and overide your files

dawn hull
#

yes

#

let me take a screenshot

frozen knoll
#

but your trying to run custom scripts that are most likely intented for extDB2

#

you should install extDB2

#

plus exile wants extDB2 and you probably havnt overidden all of exile files

dawn hull
#

define overidden all of exile files

#

im that can mean a lot sorry

frozen knoll
#

extdb2 has differant calls to 3

#

there for default exile files will need updated calls to work on 3

grave torrent
#

calls / ini are different

dawn hull
#

how ever ExileServer_object_vehicle_database_insert.sqf is missing?

unique sundial
#

Please show your ExileServer_object_vehicle_database_insert.sqf

grave torrent
#

@dawn hull - My suggestion, start fresh. Use extdb2 get that working.

#

Follow default exile install guide.

dawn hull
#
 * ExileServer_object_vehicle_database_insert
 *
 * Exile Mod
 * www.exilemod.com
 * © 2015 Exile Mod Team
 *
 * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. 
 * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/.
 */
 
private["_vehicleObject", "_position", "_vectorDirection", "_vectorUp", "_data", "_extDB2Message", "_vehicleID"];
_vehicleObject = _this;
_position = getPosATL _vehicleObject;
_vectorDirection = vectorDir _vehicleObject;
_vectorUp = vectorUp _vehicleObject;
_data =
[
    typeOf _vehicleObject,
    _vehicleObject getVariable ["ExileOwnerUID", ""],
    locked _vehicleObject,
    _position select 0,
    _position select 1,
    _position select 2,
    _vectorDirection select 0, 
    _vectorDirection select 1,
    _vectorDirection select 2,
    _vectorUp select 0,
    _vectorUp select 1,
    _vectorUp select 2,
    _vehicleObject getVariable ["ExileAccessCode",""]
];
_extDB2Message = ["insertVehicle", _data] call ExileServer_util_extDB2_createMessage;
_vehicleID = _extDB2Message call ExileServer_system_database_query_insertSingle;
_vehicleObject setVariable["ExileDatabaseID", _vehicleID];
_vehicleObject setVariable["ExileIsPersistent", true];
_vehicleID```
#

kk i'm uninstalling 64 bit

frozen knoll
#

all the best im sure extdb2 will bring u joy

dawn hull
#

🙂

#

like wise

unique sundial
#

Input: insertVehicle:::-1:0:0:0:0:0:0:0:0:0:
this should be filled with proper data and uid but it isn't so the key constraint failed. Why this is happening? No idea @dawn hull

grave torrent
#

He needs to check his ini

dawn hull
#

hey

#
```4:20:44   Error Undefined variable in expression: _clanids
 4:20:44 File exile_server\code\ExileServer_world_loadAllClans.sqf..., line 20
 4:20:44 CallExtension 'extDB2' could not be found
 4:20:44 Error in expression <"extDB2" callExtension _query);
switch (_result select 0) do
{
case 0:
{
(format>
 4:20:44   Error position: <_result select 0) do
{
case 0:
{
(format>```
#

this is after i reinstalled extdb2

wispy cave
#

Right so I have this conditions in an addaction: sqf (player == driver (vehicle player)) && {((vehicle player) isKindOf 'Helicopter') && { ((speed (vehicle player)) < 2) && { (count (crew (vehicle player)) == 1) && { ( (!canMove (vehicle player)) || ((fuel (vehicle player)) <= 0) )}}}
And every individual condition gives me the execpted return (I'm in a GH that's on its side without gear down and without a rotor) but the entire thing together doesn't give me any return. Not true nor false, just nothing. Anybody have a clue why?

still forum
#

Not true nor false, just nothing.
then there has to be a nil in there somewhere, which I cannot see

#

what I can see however is 4 opening { and only 3 closing }

wispy cave
#

I'm an idiot, tnx

still forum
#

you don't need parenthesis aobut vehicle player btw

#

commands with just one argument are always resolved from right to left

wispy cave
#

Yea, I know

narrow pilot
#

@ruby breach The script successfully gives the AI the weapons as intended but it gives them random magazines not even defined in the script and spawns an ACP45 pistol on them as well, which they then swap to and will not swap back to their primary.

ruby breach
#

Yeah, that’s you not me

finite dirge
#

@dawn hull Are you running arma3server_x64.exe?

dawn hull
#

not anymore

#

oh exe idk

#

@finite dirge Yes i am sorry
C:\TCAFiles\Users\alexc2\96192\arma3server_x64.exe -mod="@Exile;@Ravage;@CBA_A3;@CUP_Terrains_Core;@CUP_Terrains_Maps;@CUP_Weapons;@A2ATA3;@Extended_Base_Mod;@ExtendedSurvivalPack;@RHS_AFRF;@RHS_USAF;@Chernarus_2035;@DS_Houses;@CUP_Vehicles;@CUP_Units;@A2ATA3;@infiSTAR_Exile;" -servermod="@ExileServer;@Ravage;@ExileServer;@infiSTAR_Exile;@CBA_A3;@CUP_Terrains_Core;@CUP_Terrains_Maps;@CUP_Weapons;@A2ATA3;@Extended_Base_Mod;@ExtendedSurvivalPack;@RHS_AFRF;@RHS_USAF;@Chernarus_2035;@DS_Houses;@CUP_Vehicles;@CUP_Units;@A2ATA3;" -config=@ExileServer\config.cfg -ip=198.50.232.241 -port=2312 -profiles=SC -cfg=@ExileServer\basic.cfg -name=SC -autoinit -enableHT -loadMissionToMemory -filePatching -malloc=

finite dirge
#

Extdb2 is 32bit

#

Wont run with x64

rough heart
#

@finite dirge look closely to his servermod list

finite dirge
#

ExileServer is so nice he loads it twice?

rough heart
#

He loads clients side mods in the servermod parameter as well

dawn hull
#

the guy from infinisstar help said i should do that shoud i not be doing that ?

still forum
#

shoud i not be doing that
you should not be doing that, thats absolute nonsense
Only servermods you have are ExileServer, and..... seems like nothing else

finite dirge
#

I'm also a guy from the infiSTAR discord and I would not say to do that, so I'm not sure what you are talking about. You are still running a 32bit extension with 64bit arma, so it'll never work.

dawn hull
#

theoldman told me to do that. may be he was confused

#

idk it is what it is

#

thanks for telling me i though something was off with that normally i would not put my mods into the servermods. but i was just listening to him

muted hill
#

Anyone know how to see which turret owns a pylon weapon? setPylonLoadout lets you specify the turret that the weapon will be given to, but I can't see a way to back-trace either that or the turret ownership as assigned through the editor's pylon section in a unit's attributes... 🤔

#

Also, seems odd that it doesn't look like you can specify weapon owner for preset loadouts, only for the initial loadout?

muted hill
#

(Should say for the first part that I realise I can do mashiness via magazinesAllTurrets, but it seems unnecessarily clumsy, and I was hoping I'd just missed a function/feature)

rough heart
#

@dawn hull I doubt that TheOldMan told you that.

dawn hull
#

Why would i lie

#

i have no resining to lie

dawn hull
#

so this script is really strange. i have a array of vehicles, the server console is saying it can or is only spawning exile vehicles. however on the server if i go into game. there is vehicles from that array spawing but there not being put into the data base some help would he awesome thanks
heres my server rpt :https://pastebin.com/MJgPjsNN

unique sundial
#

Why ExileServer is listed twice in servermod?

dawn hull
#

mod="@Exile;@Ravage;@CBA_A3;@CUP_Units;@CUP_Vehicles;@CUP_Weapons;@CUP_Terrains_Core;@Chernarus_2035;@DS_Houses;@Extended_Base_Mod;@ExtendedSurvivalPack;@A2ATA3;" -servermod="@ExileServer;@ExileServer;@infiSTAR_Exile;" -config=@ExileServer\config.cfg -ip=198.50.232.241 -port=2312 -profiles=SC -cfg=@ExileServer\basic.cfg -name=SC -autoinit -enableHT -loadMissionToMemory -filePatching

#

?

#

oh

#

good point ty

#

== arma3server.exe -mod="@Exile;@Ravage;@CBA_A3;@CUP_Units;@CUP_Vehicles;@CUP_Weapons;@CUP_Terrains_Core;@Chernarus_2035;@DS_Houses;@Extended_Base_Mod;@ExtendedSurvivalPack;@A2ATA3;" -servermod="@ExileServer;@infiSTAR_Exile;" -config=@ExileServer\config.cfg -ip=198.50.232.241 -port=2312 -profiles=SC -cfg=@ExileServer\basic.cfg -name=SC -autoinit -enableHT -loadMissionToMemory -filePatching

dawn hull
exotic flax
#

It tries to do some stuff on a variable which doesn't exist, most likely because createVehicle failed somewhere before those lines

#

Or simply a typo

#

The message actually tells you exactly what is wrong, just finding why is something it can't (nor we without the full scripts)

dawn hull
#

@exotic flax are you able to fix it for me 🙂 ?

#

i did not code it im just just to fix it but i have no idea how XD

#

not a programmer by far 😦

exotic flax
#

since it's Exile related you probably will have more luck in the Exile Discord channel

#

(especially since there seem to more errors there which are Exile related)

worn flame
#

Is there a way to find out the length/width/rotorspan of a vehicle via script?

exotic flax
#

boundingBox and boundingBoxReal might be functions which can help you with that

#

eg. I use the following to get the length of a vehicle:

params ["_object"];

_bbr = boundingBoxReal _object;
_p1 = _bbr select 0;
_p2 = _bbr select 1;
_maxLength = abs ((_p2 select 1) - (_p1 select 1));

_maxLength;
worn flame
#

Thankyou!

tame lion
#

Question regarding the "onDraw" UI Event Handler and commands like drawTriangle, drawPolygon, ETC; does onDraw essentially function like onEachFrame but only when the map is open? and if so, then the drawXYZ commands only create the shape on that "frame"?

exotic flax
#

as far as I understand it, the draw* functions will only show for a frame, so using the Draw EH is required to redraw on the map every single frame (which only happens when the map is open)

tame lion
#

so my concept is right it sounds like? EX: I wanna draw lines between all group members and their leader of a group only when the map is open, so i could set this up simply w/onDraw and drawLine basically?

exotic flax
#

yes

#

and it should also work with the GPS (which technically is a small map)

tame lion
#

thanks Grezany for confirming that for me. I'm not able to test it right now but might use that concept in a project I'm working on

#

cool, but is the GPS a different control from the main map findDisplay 12 if I'm not mistaken?

exotic flax
#

correct

private _miniMapControlGroup = _display displayCtrl 13301;
private _miniMap = _miniMapControlGroup controlsGroupCtrl 101;
_miniMap ctrlAddEventHandler ["Draw", {
    // draw stuff on GPS
}];
vernal mural
#

Does allowDamage false prevent rounds to penetrate an object and go through it all the way to the other side ?

#

Let's say a wooden plank with damage disabled : can you hide behind it and stay safe while being fired at from the other side ?

still forum
#

projectiles still penetrate

#

it just disables the damage from being applied to the object that they penetrated

unique sundial
#

Make it as simple object

still forum
#

but simpleObject still has the surface material?

unique sundial
#

Yeah but have you seen it letting things through?

astral dawn
#

@still forum I recall you were talking about making an anything -> anything hashmap long time ago, I don't think you have made that, have you?

still forum
#

correct

astral dawn
#

Ok, I have realised that it could accelerate one my algorithm if I implemented a cache

#

Then, maybe there is a faster way to generate a string from an array of arrays of numbers, than just using str _array ?

still forum
#

main problem with the map is needing to have a hash implementation for every variable type

unique sundial
#

@astral dawn if you want fast, Enfusion is this way =>....

astral dawn
#

Yes is there also Arma 4 that way? No? Don't see it 😄

unique sundial
#

Me neither

astral dawn
#

Are there going to be any problems if I setVariable a string which has a length of ~1000 characters?

unique sundial
#

for the name?

astral dawn
#

yes

vernal mural
#

Looks like I have some troubles with Locations... According to BI wiki, setVariable should be able to work on locations. However, if I do the following :

loc = (nearestLocations[player, ["NameCityCapital", "NameCity", "NameVillage"], 1000]) select 0;
hint text loc; //Topolia
loc setVariable ["test", true];
hint str (loc getVariable "test"); //this fails, nothing is returned
hint str (loc getVariable ["test", false]); //this works, displays "false"
#

Do I miss something ?

#

Sorry for interrupting @astral dawn, didn't see you just posted a question 😅

unique sundial
#

maybe you cannot do it on existing map locations

#

there are a bunch of things you cannot do to them that you can do to locations created by script

astral dawn
#

You can setVariable on locations created by script, for instance
createLocation ["Invisible", [0,0,0], 0, 0];

still forum
#

@astral dawn no problems

astral dawn
#

thx!

#

just testing it now, see no problems either

vernal mural
#

Thx guys, indeed created locations are fine with setVariable... Strange. May worth mentionning on the wiki ?

unique sundial
#

maybe if you publicvariable those then you will have some problems? @astral dawn

astral dawn
#

Sure I will have... my application is local anyway

unique sundial
#

May worth mentionning on the wiki ?
gonna test it to confirm and then add if true

#

@astral dawn get/set variable is actually slower on 1000 char variable

#

2 times slower

topaz forum
#

Hey I need someones help to show me how to add a script to my mission file and make it work

astral dawn
#

For me getVariable on a string which is 1000 chars long is around 2 microseconds

#

It's quite fast

unique sundial
#

compare it with like 10 char string

#

as everyone has different PCs the total time means nothing

astral dawn
#

yeah ok, so to clarify, for my situation: my algorithm takes 3+ ms to compute, so I want to implement a cache, for that I do _key = str _this; and see if hashmap getVariable _key returns a cached result... so it should be okay for me 🙂

unique sundial
#

@still forum did cache revert break your offsets?

still forum
#

It broke the hotfix that I did for cache, I just reverted the hotfix again, all fine

unique sundial
#

that release before hotfix was odd

still forum
#

no doubts

unique sundial
#

@astral dawn I tested on player set/get variable. on missionnamespace takes 3 times longer

#

probably because there are 1753 variables already

astral dawn
#

yeah i guess so

still forum
#

depends on how.. dunno the word. spread,compacted the hashtable is

#

it only does hash lookup to find the correct array (out of which it has dozens, for hundreds of variables)
then inside that array it does stringcompare for every entry to find the right one

unique sundial
#

year 2000 complicated

#

or even early, depends when BI wrote that hash

still forum
#

it should only do stringcompare until it finds the first not matching char tho.. so that should be fast.
But I can certainly see BI doing that improperly

astral dawn
#

Dedmen, do you know, when two strings are compared, does it compare the data pointer first?

#

IIRC i've read somewhere, it does this for arrays

still forum
#

no

#

I wish it did tho

#

Intercept does afaik, Arma doesn't

astral dawn
#

Hmm okay... I am thinking of the fastest way to make my cache discard less frequently used entries when it gets too full

astral dawn
#

after doing object setVariable [varName, nil], varName will still be in allVariables object, is it a bug?

still forum
#

semi bug but not really kinda

heady peak
#

First time visitor here, I have tried googling but have not found an answer to my question and friend pointed me here. Is it possible to extract Squad names from list of cargo? What I am trying to do is ( eventually ) have a gui that I can choose a particular squad in my cargo and have a particular squad get out. Is this even possible?

exotic flax
#

Get list of all units in cargo -> create a list of the group each unit is in -> cleanup list

worn forge
#

The problem with that is that some vehicles have gunner positions which you'd probably consider as in cargo, so you'll want to evaluate certain turrets

heady peak
#

Hmm...food for thought. Would it matter what position though, if you had say a squad that had filled some turret positions you could still unload / discharge them?

hazy agate
#

Hello, I'm rather new to scripting in arma, could someone help me with remoteExec and init.sqf since I'm running into some issues

winter rose
#

Hello new to scripting in arma, I am dad!

hazy agate
#

Hello, could you tell me how can I add action to every player that is on the server? This script seems to work if I execute it serverwise (in debug console), however it doesn't do anything when it's in init.sqf

[player, ["Repack magazines", "magazineRepack.sqf"]] remoteExec ["addAction", 0, true];
winter rose
#

should only the player be able to access this action, or all players/units?

hazy agate
#

All players that are on the server

unique sundial
#

If you put it in init.sqf you don’t need remoteExec

winter rose
#

@hazy agate should a player be able to repack another player's magazines?

#

if not, then just addAction normally, don't remoteExec

hazy agate
#

No, he shouldn't be able to, he can only do it with his own magazines

#

Alright, let me give it a try

winter rose
#

then player addAction [(...)] yes

hazy agate
#

Hmm, I still don't see action under scroll

winter rose
#

code plz?

hazy agate
#
player addAction ["Repack magazines", "magazineRepack.sqf"];
#

Nothing innovative i think

winter rose
#

indeed

#

try adding a tiny sleep before that

unique sundial
#

You sure it is init.sqf and not init.sqf.txt? Add some logging to see if the file even runs

hazy agate
#

Nope, it's init.sqf, been playing with that file for quite a while today and it works

#

Adding some more things to it now, adding sleep and even moving the line to the very top didn't seemed to fix issue

unique sundial
#

What happens if you run that line from debug console?

hazy agate
#

It works perfectly fine, adds the action to player

#

Yes, init.sqf runs since I also load one more script and set the weather parameters and such

unique sundial
#

Then it doesn’t execute in init.sqf

winter rose
#

or something crashes before that and you don't display errors maybe?

hazy agate
#

Well I see the syntax errors if I have any right after I get to the briefing, doesn't seem like there are any right now

unique sundial
#

Do this
[] spawn {uisleep 1;....your code...};

winter rose
#

something holds up the execution before then?

unique sundial
#

Add that at the top of init.sqf

hazy agate
#

I don't think so, since I moved the execution to the very top and it still did not added action to player

#

Let me try @unique sundial

#

Still nothing, this is bizzare 😄

unique sundial
#

Your init.sqf doesn’t run

#

There is no point arguing further

hazy agate
#

Well thing is I can assure it does run because I can change mission parameters such as weather, I also load a script that shows hints on the screen and I do see them right from the start of the game

#

That single line for some reason doesn't seem to run with addAction

unique sundial
#

Add diag_log "something"; at the top and check rpt

frozen knoll
#

do that ^
also try add to initPlayerLocal.sqf

waituntil {!isnull (finddisplay 46)};
player addAction ["Repack magazines", "magazineRepack.sqf"];
hazy agate
#

Didn't know that there's such tool as diag_log, thanks for showing me, anyway got RPT log, 23:28:51 0 this line is result of addAction, not sure if I did it right but here's script and entire log from mission start

diag_log (player addAction ["Repack magazines", "magazineRepack.sqf"]);
23:28:51 c:\bis\source\stable\futura\lib\network\networkserver.cpp NetworkServer::OnClientStateChanged:NOT IMPLEMENTED - briefing!
23:28:51 [1.17796e+006,37650,0,"XEH: PostInit started. MISSIONINIT: missionName=sandbox, missionVersion=53, worldName=Altis, isMultiplayer=true, isServer=true, isDedicated=false, CBA_isHeadlessClient=false, hasInterface=true, didJIP=false"]
23:28:51 [1.17796e+006,37650,0,"CBA_VERSIONING: cba=3.12.2.190909, "]
23:28:51 [1.17796e+006,37650,0,"XEH: PostInit finished."]
23:28:51 Weather was forced to change
23:28:51 Weather was forced to change
23:28:51 Weather was forced to change
23:28:51 0
23:28:52  Mission id: ad20d7251d871a0215aca8ef79fb1467566757e3
23:28:57 Duplicate weapon Throw detected for B_officer_F
23:28:57 Duplicate weapon Put detected for B_officer_F
#

Let me give it a try @frozen knoll

unique sundial
#

So you see the action?

hazy agate
#

Nope, still don't see it via init.sqf, trying with initPlayerLocal.sqf now

unique sundial
#

According to the log it is added. Try verifying local files via steam

#

Execute in debug console
hint str actionIDs player

#

What is the result?

hazy agate
#

Well empty array []

astral tendon
#

Killzone_kid? I dont see your name for soo long

hazy agate
#

I tried initPlayerLocal.sqf, still nothing for some reason

unique sundial
#

Then some script removes the action you added

hazy agate
#

That is also a possibility, I do not have any sciprts that do that, only mods that I run is CBA and ShackTac display

unique sundial
#

Should show [0]

hazy agate
#

I don't think they alter anything to be honest

unique sundial
#

There is only 1 way to find out, disable all mods

hazy agate
#

Yup, giving it a try now

#

Well, still nothing even on full vanilla

#

I think I found the issue, checking it now

frozen knoll
#

the code is fine... test on a fresh mission without any other scripts then one by one add other scripts back

hazy agate
#

Yup, I feel like an idiot

#

Turns out respawn system broke everything

#

Running player addAction ["Repack magazines", "magazineRepack.sqf"]; in onPlayerRespawn.sqf fixed the issue

#

Found some info on forum that it's action is not persistent and needs to be assigned on each respawn

frozen knoll
#

you run respawn on start i guess?

hazy agate
#

Nope players need to click respawn, I'm gonna change that so they respawn automatically right from the start without doing anything

#

Anyway thanks for the help everyone!

jagged field
#

If I wanted to change the magazine capacity and ammo type of a gun, could I do it in the editor init of the gun?

dawn hull
#

how would i call for some code in a addon, and then tell it to disable/not use a certain please of code ?

example C:\Users\pc\Desktop\exilemod editing@Ravage_Server\addons\ravage\code\survival/inventory.sqf
call inventory.sqf "addons\ravage\code\survival"

#

but i have no idea how to tell it to disable this

copper seal
#

Hi all! I'm having a pretty random problem with: loadFile

while {true} do {
_contents = loadFile "textDoc.txt";
if (_curUser != _contents && _contents != "") then{
etc, etc
sleep 10;
};

The problem I'm having is that whenever I put the loadFile in a loop, regardless of how long the sleep in the loop is, ARMA permanently has the file open and I'm unable to modify the file with note pad or any other program while the mission is running. ARMA doesn't seem to have the file open permanently if you just call it once so it seems to be something to do with having it in a loop...

Anyone know if there's some sort of closeFile function or some way around this?

modern sand
#

Hey guys, bit of a random question but does anyone know of a way either using Notepad++ or Sublime Text to automatically format your SQF code. Meaning automatically add the indentations for the entire file (Too make it look prettier/cleaner I suppose) rather than having to do it manually?

finite dirge
#

(vscode tho)

modern sand
#

Thanks, I'll give it a try

copper seal
#

Just further to my last, it turns out even without the loop loadFile keeps the file open until the mission ends. Anyone know if it can be closed somehow?

copper seal
#

Ok, I didn't know that INIDBI2 was a thing. It can do exactly what I need 😄

dawn hull
#

So im using this script for spawning vehicles in but its not saving them all to the db and after restart there gone
https://pastebin.com/d2e7wPnp

error in console

 3:39:03 "ExileServer - Job with handle 10005 added."
 3:39:21 BEServer: registering a new player #427682043
 3:39:26 ["ExileServer - Spawning persistent vehicle spawns"]
 3:39:27 "[Display #24]"
 3:39:28 Cannot create non-ai vehicle B_APC_Tracked_02_AA_F,
 3:39:29 Error in expression <llExtension _query);
(_result select 1) select 0>
 3:39:29   Error position: <select 0>
 3:39:29   Error Generic error in expression
 3:39:29 File exile_server\code\ExileServer_system_database_query_insertSingle.sqf..., line 16```
drifting copper
#

We are using

if(isClass(configFile>>"CfgPatches">>"modname"))then{
endMission "LOSER";};

to blacklist certain mods. It is for a private server and guys are starting to take more chances and in short, it will be a pain to find and blacklist all the force zeus and arsenal mods.
Do not want to whitelist Keys as we are using steam workshop and if a update releases just before or during a OP we do not want to wait for updates before we can start.

Is there a similar script that checks for "permitted" mods and allows the client to connect still allowing certain optional clientside mods like JSRS or Blastcore without forcing those mods on everyone?

hazy agate
#

Hello, anyone have idea how to loop animation on player until certain condition or disable movement for the player during the animation? I want to loop animation where player "uses" his inventory but whenever I put some input on the character he stops the animation.

winter rose
#

@hazy agate while, waitUntil and animationState 😉

hazy agate
#

Do I need to run remoteExec on animation or I can just use _caller switchMove "anim";

winter rose
hazy agate
#

Alright, forgot the player first argument

worn forge
#

If you're in a multiplayer environment you have to run it on all clients if you want all clients to see the anim, as it is a local command

#

Which leads to a question: is it more efficient to:

  1. run a quick check to see how many players are within, say 200m and only remoteExec switchmove on them on the theory that it doesn't make sense to run it on a client who won't see it, or;
  2. just remoteExec it on all clients, for more network traffic.
winter rose
#

@worn forge Argument local, Effect global

worn forge
#

"In order for the animation to change immediately on every PC in multiplayer, use global remote execution"

winter rose
#

to change immediately
but I agree, in this case it can be remotely executed

If you're in a multiplayer environment you have to run it on all clients if you want all clients to see the anim, as it is a local command
This ☝ was incorrect though

#

remoteExec is to have an immediate sync, with the downside that if an anim is supposed to remain, it would only be temporary if target is remote

astral dawn
#

Is there a way to customize the respawn screen just a bit? Maybe CBA has patched its function?

#

I'd like to set different marker names

heady peak
#

I am a Newb scripter, could anyone please help in telling me how I can determine what group names are in a vehicle via script?

astral dawn
#

Sure, just push group of each crew member of vehicle into the array

#

use crew and group command for that

heady peak
#

If I wanted ALL then I would have to choose cargo also, is turret covered by crew or vehicle dependant?

astral dawn
#

it returns literally all units in the vehicle

#

driver, gunner, commander, etc, and those who are in cargo seats too

heady peak
#

Oh, I always thought cargo was seperated...huh good to know, cheers

uneven torrent
#

Good morning. Has anyone of you tried directly applying damage to a player via ACE3's fnc_addDamageToUnit ? I couldn't find info on the scope of it - I would assume the arguments and effects are local, but I can't try it out at the moment

smoky verge
unique sundial
#

Seriously, how can people develop A3 scripts on stable with -showScriptErrors off? I dont even....

exotic flax
#

if warnings/errors are disabled, they don't exist 🤣

worn forge
#

Given the amount of crap that ends up in the .rpt file ("Server: object not found" hundreds of times) I'm sorely tempted to run without a log, except for the diag_log messages I put in there...

exotic flax
#

On servers and during regular play time I usually also have errors disabled, just to prevent having huge RPT files.
However when I'm working on mods, missions or scripts in general I always enable errors to make sure nothing is broken...

#

and even then some stuff pops up afterwards...

tough abyss
#

Hello everyone in the scripting community! New fresh meat here. I'm trying to get into scripting for Arma 3, and I have next to no experience in coding. My only "experience" was back when I was 15, I spent 3 days on making 50 lines of code for a minecraft server plugin that only said "JQM plugin activated!" in the server console, and it didn't even work. So, other than read the wikis in the pictures (i'm currently reading them all), how can I get into coding?
https://i.gyazo.com/9ab938439538a979e1ac3840551fe41c.png
https://i.gyazo.com/da01b4ac26df296235ee8d15c1df39b2.png
https://i.gyazo.com/8d0c5b0cec26eab4a18a9063cf33c1b8.png

winter rose
#

Practice

astral dawn
#

Make some goal for yourself, like 'I want to make ..., ..., ... in ARMA', and try to solve how to reach that, asking questions here, but check biki first

tough abyss
#

That link is definitely going into my bookmarks

twin robin
#

Guys, i need some help, for some reason the following code doesnt execute nor throws any error

#

it just gets skipped

#

{
[_x] call clv_fnc_puntosSpL;
}foreach Sectores;

#

i added hints inside but it doesnt call the function

#

that function is defined inside a functions.hpp and included in description.ext

twin robin
#

😰 pls help

unique sundial
#

Dude, you provided no information

twin robin
#

@unique sundial Sorry, i was in a hurry, i managed to fix it. Ill leave a piece of advice for anyone scripting. IF YOU COMMENT ANY TYPE OF LOOP, PLEASE FOR THE LOVE OF GOD, CHECK IF YOU LEFT ANY { OR } UN-COMMENTED

#

the script was made by a friend and he commented some parts incorrectly

worn forge
#

You still haven't given us anything, really. What is contained in the Sectores variable? What is in that function you're calling? Pastebin both of those for a start

astral dawn
#

Are there any known practical limits of variable size for setVariable into profile namespace?

#

I'd assume if arma can hold a variable in RAM then it can serialize that into a file easily?

jaunty zephyr
#

Probably yes to the latter. What's your use case @astral dawn

astral dawn
#

Well, potentially some kilobytes per profilenamespace variable

#

array with strings and numbers and arrays

unique sundial
#

As UI uses profileNamespace by clogging it you can potentially make UI laggy which would deteriorate user experience. I’d say no to using it for anything other than saving small amounts of data

jaunty zephyr
#

@astral dawn at our unit, we're using profilenamespace to store mission state (units, objects, loadouts, tasks…). cant say how large those get off the top of my head, but you should be fine… at least no one has complained yet 😬

#

ah, but we do it on a dedicated server, so UI is not an issue there 🤔

tough abyss
#

Hey guys, how do you use createVehicle and spawn in the vehicle that you've spawned?

frozen knoll
#

player moveInDriver _veh;

tough abyss
#

Ok, will try tomorrow 🙂

smoky verge
#

I've created an addaction to open the strategic map as a mean to teleport around the map but I can't apply a teleporter to each "mission"
the strat. map when in script works like this

            ,                                                // 0: Position - 2D or 3D position of mission
            ,                                                            // Script code that is being executed after player clicks
            "",                                                    // String - Mission name
            "",                                                                 // String - Short description
            "",                                                            // String - Name of mission's player
            "",                                                            // String - Path to overview image
            ,                                     // Number - Size multiplier for overview image (Same for markers.cfg)
                                                                    // Array - Parameters for on-click action.
        ],```

I've already understood where I need to place the teleporting script but the ones I know dont seem to work
what should I use to have MP players teleport when clicking on the mission?
astral dawn
#

@unique sundial thanks, that's for saving game world state anyway, so when the save happens, the game should freeze

exotic flax
#

I'm trying to loadouts with getUnitLoadout on a custom faction, which does return all the units I have (in ACE Default Loadouts), but custom weapons (with attachments) and backpacks (with contents) are not being included.

To me it seems to be related to (a broken) BIS_fnc_baseWeapon and BIS_fnc_basicBackpack, but perhaps I'm doing something impossible...

#

do note that the custom weapons and backpacks have a scope of 1, to prevent them from showing up in the Arsenal

unique sundial
#

What is broken in BIS_fnc_baseWeapon and basicBackpack and what getUnitLoadout has to do with these functions? @exotic flax

exotic flax
#

getUnitLoadout gives the exact loadout (including custom items with scope=1) which are then given to ace_arsenal_fnc_addDefaultLoadout (which is compatible). However ACE is using BIS_fnc_baseWeapon and BIS_fnc_basicBackpack to find the core configs (without attachments/contents).
This breaks the loadout, because it can't find the base weapon/backpack (not to mention it doesn't handle the attachments/contents, but that's another issue).

#

But like I said, perhaps I'm doing something impossible or completely wrong

unique sundial
#

So in which way both those BIS function are broken? @exotic flax

#

For the love of god I can’t figure out what you are saying

exotic flax
#

they don't return the base class, even when setting baseWeapon in the configs...

unique sundial
#

baseWeapon is not vanilla, it is ace param

#

Why should they use it?

exotic flax
#

actually, it's a vanilla feature... just check the function in A3\Functions_F_Bootcamp\Inventory\fn_baseWeapon.sqf (line 26)

#

and ACE uses it to prevent issues with duplicates (like predefined attachments and pre-filled backpacks), just like vanilla Arma does

#

or stuff like TFAR/ACRE radios with a shitload of ID's to make sure only the core class is returned

still forum
#

tfar actually doesn't use baseWeapon.. probably should 🤔

last rain
#

In MP when player dead, I see bird.
I wish people have spectator, but I not wish see bird.
I have this setup: respawn = 1; respawnTemplates[] = {"Spectator"};

unique sundial
#

Ah yeah, looks like it is vanilla, and the function looks ok, what is broken? If there is baseWeapon entry it should return the content. @exotic flax

#

they don't return the base class, even when setting baseWeapon in the configs...
You have repro?

#

respawn=1; is respawn as seagull @last rain

#

It is engine param

exotic flax
#

at this time I don't have a contained reproduction, will try to make one

last rain
#

@unique sundial

respawnTemplates[]     = {"Spectator"};```
it is working in MP? I think respawn=1 need if you use "Spectator"
unique sundial
#

Respawn 0 is no Respawn

#

There is also 2,3,4 and 5, it is not 0 false 1 true

runic stratus
#
sleep 5;
this enableSimulation True;
this allowDamage True;
``` getting generic error in expression?
trying to enable & simulation & damage on a vehicle that has simulation & damage disabled through editor.
still forum
#

this is only valid in one context (init box in editor) and in init box in editor you cannot sleep

#

you can wrap it in a spawn {}, and pass the this through like this spawn {_this enableSim...}

runic stratus
#

k thanks

quasi thicket
#

Can anyone tell me how I can detect if the RHS Tochka has been fired? Not sure how to use EventHandlers
Basically what i want to do is place a marker on the position of the launcher with createMarker, but i need to detect when it fired

young current
#

fired eventhandler is probably the thing you want

waxen tendon
#

massive dump coming, ill wait till you guys finish

young current
#

or firedNear perhaps

#

🚽 @waxen tendon pls

quasi thicket
#

this addEventHandler ["fired", createMarker in the init of the vehicle ?

quasi thicket
#

yeah i saw that page, but like i said... i dont really know how to implement EventHandlers

young current
#

youre in the right path with the addEventHandler command

waxen tendon
#

here we go

#

description.ext:

#include "functions.hpp"

functions.hpp:

class CfgFunctions {
    class fnc {
        class rmStarterInfo {
            postInit=1;
            file = "\fnc\fnc_rmStarterInfo.sqf";};
    };
};```
fnc/fnc_rmStarterInfo.sqf:
```sqf
starterInfo = ["starterInfo1", "starterInfo2"];
{deleteMarker _x} forEach starterInfo;
hint "it works!";```

calling fnc_rmStarterInfo does not work
does not get postInited either because i dont see hint
hälp
quasi thicket
#

this addEventHandler ["fired", createMarker ["Launch Detected", position SCUD]; or am i thinking too simple here 😛

waxen tendon
#

this addEventHandler ["fired", "createMarker [""Launch Detected"", position SCUD];"]; should work

quasi thicket
#

thanks i'll try that

unique sundial
#

createMarker ["Launch Detected", position SCUD]; it wont show anything

quasi thicket
#

but that's all i need according to the example 😦

young current
#

ah the scud

#

Im not sure if its a weapon

#

in the Arma sense that is

#

what do you use to fire it?

unique sundial
#

but that's all i need according to the example
Did you read the text in orange box?

waxen tendon
#

your object should be named SCUD

#
SCUD addEventHandler ["fired", "marker1 = createMarker [""Launch Detected"", position SCUD];marker1 setMarkerShape ""ICON"";marker1 setMarkerText ""Launch Detected!"";marker1 setMarkerType ""hd_dot"";marker1 setMarkerPos getpos SCUD"];```
#

@quasi thicket

#

tell me if it works

quasi thicket
#

where do i put that @waxen tendon ?

#

in the vehicle init or mission init ?

waxen tendon
#

doesnt matter as long as vehicle variable is SCUD

#

may be wrong so try both

quasi thicket
#

sweet works!

#

Thank you for the help erentar

waxen tendon
#

welcome

warm iris
#

Hi-ho, might be being a tiny bit dumb, but at current I have the following thing I'm trying to do:

Addaction to a object to change a units equipment to whatever is contained within the .sqf for such item. At the current moment I have a rifleman loadout exported from arsenal within the .sqf file, an action on the object to give it, however when the action is selected nothing happens

astral dawn
#

Show the code, noone has a 🔮 here

warm iris
#

On the item the action is attached to:

_actionID = this addAction ["<t color='#FF0000'>Get Rifleman Loadout</t>","Loadouts/rifleman.sqf"];

Rifleman.sqf (due to characters I've pastebinned it): https://pastebin.com/UgtmAKah

astral dawn
#

Hmm I've never tried to pass file path into addAction. Does it running the script with call compile preprocessfilelinenumbers "Loadouts/rifleman.sqf"; give you the effect?

#

oh, in fact I know what the problem is

winter rose
#

this is wrong

astral dawn
#

it's because arsenal exports removeBackpack this and similar commands, this variable only exists in init field of a unit

#

yeah

#

so... you could add this = player; into your rifleman script

warm iris
#

still does the same with this = player; in the rifleman.sqf

unique sundial
#

@astral dawn no, the script is execVMed if you pass script path to addAction. As for arsenal, there is an option to export for use in scripts instead of init, the unit uses _unit variable

warm iris
#

nothing on google, forum & yt I can find helps either tbh

astral dawn
#

first make sure that running the script in question produces result alone

#

without addaction

warm iris
#

so just slap the script itself in the init?

high silo
#

Has anyone got a script for damaging the helicopter i.e tailrotor in eden

astral dawn
#

call compile preprocessfilelinenumbers "Loadouts/rifleman.sqf"

warm iris
#

absolutely nothing happens

#

Seems odd that nothing seems to appear anywhere as its such a simple thing I'm tryna do

astral dawn
#

well we have told you already that the problem is in this variable

#

and possible solutions are, re-export from arsenal as KK said

#

or do this = player; at the top of script

unique sundial
#

Where is this script called from?

astral dawn
#

from action context

unique sundial
#

AddAction context?

astral dawn
#

well yes, it's inside addAction

#

_actionID = this addAction ["<t color='#FF0000'>Get Rifleman Loadout</t>","Loadouts/rifleman.sqf"];
warm iris
#

Its basically meant to give a preset loadout from a .sqf (exported from arsenal) to an action on an object (not player)

still forum
#

"Loadouts/rifleman.sqf" wrong slash

#

slaps everyone for not seeing that

warm iris
#

fixed slash issue, still doesnt give any effect

astral dawn
#

but... we have explained to you the problem... this variable... 😢

unique sundial
#

You need to use (_this select 1) instead of this

astral dawn
#

When action code gets called it gets these parameters

Parameters array passed to the script upon activation in _this variable is:

params ["_target", "_caller", "_actionId", "_arguments"];

#
target (_this select 0): Object - the object which the action is assigned to
caller (_this select 1): Object - the unit that activated the action
ID (_this select 2): Number - ID of the activated action (same as ID returned by addAction)
arguments (_this select 3): Anything - arguments given to the script if you are using the extended syntax
winter rose
#

slaps everyone for not seeing that
slaps back because it works too

warm iris
#

regardless I have tried all of the suggestions and to no avail, which is confusing

astral dawn
#

well then debug your code line by line... 🤷‍♂️

#

through the console

warm iris
#

thats what I'm looking at doing.

astral dawn
#

You need tools for debugging? CBA has a good debug console. Arma Debug Engine helps find scripting errors.

warm iris
#

Slinging the stuff from rifleman.sqf into the units init gives the exact stuff. I should also have the debug stuff to hand :}

#

Okay all I get out of it is: unit cannot be null

#

But thats all I get out of the debug console for both bits of code

warm iris
#

I've just noticed something I am a f**king idiot.

#

So my files (sqfs) were going into the mission path. Where as eden was making ~missionpath

#

@astral dawn Now I've found that out I did the this = player; and the script works fine, thanks for helping out <3

still forum
#

keep in mind that this is a global variable

#

and if your script is scheduled, you may run into weird problems that won't make any sense to you

warm iris
#

mhm, one other question I had, there's not a like low limit to how many addactions can be attached to one object?

winter rose
#

Nope

#

but think of the baby cats God kills on every player's scroll

still forum
#

I'd assume there is some limit

#

but I don't know what it is

warm iris
#

Probably but its not like, a low number

astral dawn
#

max int or something like that

still forum
#

doubt its that high

#

just try it out, add them in a loop 😄

astral dawn
#

max int / 2 xD if it's signed

still forum
#

its RV engine, ofc its signed

#

array lengths are always signed

#

just in case you have to handle a negative size array sometime

surreal peak
#

Hang on a second...

hot kernel
#

@warm iris , "mhm, one other question I had, there's not a like low limit to how many addactions can be attached to one object?"
If you're considering performance and especially if the "object" is player the important factor is conditions. I think some lazy scripting can help here.

exotic flax
#

I'm sure there's a technical limit of the amount of addActions an unit or object can have, which most likely will hit due to memory limitations instead of integer limitations.
Although I also believe that it's near impossible to hit that limit on realistic use cases...

That said; unless an action is for a player himself it will make more sense to add actions to an object instead, which will prevent the action from being active all the time (since it won't do anything unless someone gets in range, except for checking if players are in range)

winter rose
#

2D UI will most likely crash before reaching that limit yes 😄

bold kiln
#

I'm looking to put a player into a sitting position after selecting an action.
I may have misunderstood but I've tried using "switchMove" to get them into it a sitting animation
I'm hoping to see if someone here knows more on what to do

#

an animation to get into said position is also an issue

tough abyss
#

How do you use cursorTarget to move your player inside a vehicle you are pointing at. (your player intro driver seat)

I know player moveInDriver _veh;

But I don't know how to use cursorTarget to look at a vehicle and go in the driver seet

frozen knoll
#

player moveInDriver cursorTarget;

frozen knoll
#

@bold kiln player switchMove "AidlPsitMstpSnonWnonDnon_ground00";

#

you can find animations in animation viewer under tools in 3den editor

muted hill
#

Hi all! I asked about this late last week, but didn't get any nibbles at the time - query about scripting pylons, and determining which turret "owns" which hardpoint.

As far as I can see, there aren't any functions that directly return this information, nor can I see any way to reliably deduce the information from other means (such as examining weaponsTurret/magazinesAllTurrets, as these collapse duplicates and don't provide pylon-respecting ordering between the various turrets).

Anyone got any knowledge of this? Is it really a gap in the game, or have I just missed something?

#

(Use case is I've got an in-mission loadout UI that's working fine, except for knowing who the pylons currently belong to on loading the UI)

cunning crown
#

I guess you can take a look at how BI do it, iirc, they correctly show pylons placement on their loadout menu

muted hill
#

If you're talking about inside the 3den editor, then that looks like it's because it's reading the data out of the mission.sqm itself, as an editor attribute

#

If you're talking about something else, then would you mind elaborating as I'm not aware of anywhere else it appears?

scenic pollen
#

This might be a nooby question, but is there any way to reload an addon/extension without having to restart the game?

young current
#

no

spice axle
#

@scenic pollen what exactly you wanna do? Because you can load files outside pbos or enable filePatching for Not compiled final functions

scenic pollen
#

@spice axle Mainly I'm interested in reloading an extension. I guess this isn't possible

spice axle
#

Is it possible for you to change the extension file name? Because that could be possible to "deactivate" the cached extension. Possibly complete wrong but give it a try

scenic pollen
#

Thanks, I'll give it a try 🙂

unique sundial
#

You could use extension to load second extension then you can unload and load second extension without restarting the game

dusk sage
#

A freeExtension could be quite useful

still forum
#

unloadExtension*

#

extensions could force themselves to stay loaded, which might confuse arma when it tries to re-load it

queen cargo
#

One also could use SQF-VM to test his extensions (including potential SQF-Wrappers 😉)

tough abyss
#

I'm actually going to use SQF-VM for late-night coding when I travel in a month

queen cargo
#

Do not forget to update before you do then 😉
or, if no new release yet out, ask me for a lil snapshot
so you will be having the latest features

tough abyss
#

Will keep it in mind unless I forget as usual

hot kernel
#

@unique sundial says we need to skipTime on the server but how do we actually do that? Say we have an addAction with skipTime as the code, how do we make sure it is executed on the server?

unique sundial
#

Who says what?

still forum
#

remoteExec?

nocturne pagoda
#

Does anyone know where I can get a script that will allow a player to Lock & Unlock land vehicles, and if possible claim it maybe through there steam id. Thank you

exotic flax
#

Regarding the "ACE Arsenal | Default Loadout" bug I described yesterday, I managed to lock it down to ACE and created a bug report (with reproduction code). Let's see how this is going.
https://github.com/acemod/ACE3/issues/7275

hot kernel
#

@unique sundial , you know what you did! :P
@still forum , remoteExec-- so put the function in it's own sqf and then in the addAction remoteExec that .sqf?

still forum
#

you don't have to remoteExec a file, but sure could do that too

hot kernel
#

I can remoteExec a function within a file?

still forum
#

you can just remote exec a piece of code

#

or a single script command

hot kernel
#

ah- okay

still forum
#

just remoteexec the call command

#

call takes a piece of code as argument ¯_(ツ)_/¯

hot kernel
#

great, thanks!

#

may I use braces instead of quotations?

still forum
#

code is braces

#

quotes are strings

#

¯_(ツ)_/¯

hot kernel
#

I mean like in an addAction I can use braces instead of quotations but like, say in GUI "action" I cannot

still forum
#

check biki

hot kernel
#

none of the examples use braces. I mean like this,

[] remoteExec [{skipTime 6}];
still forum
#

syntax error

hot kernel
#

yup

still forum
#

remoteExec right side array takes string

#

if addAction can take code, then it probably can

#

just check the datatypes listed on biki

hot kernel
#

it's not really necessary for this example but I was curious for other uses. I'll research and play around with it a bit. Thanks @still forum

still forum
#

I can't blanket answer that for other uses

#

the answer is on the biki page for your specific use

hot kernel
#

oh

#

maybe I way missed the point

worn forge
#

[6] remoteExec ["skipTime", 2] ?

hot kernel
#

@worn forge , yes I think that's it

#

is there any forward thinking benefit of sending JIP variable?

winter rose
#

what do you mean?

hot kernel
#

@winter rose , c'mon man, you know I have no clue what I mean 😄

winter rose
#

my bad :p

hot kernel
#

@still forum , shows me something cool and then I ask a bunch of stupid question until I have 2 weeks to play around with it-- just let me go through the motions! 😄

exotic flax
#

I usually spend 2 weeks breaking my neck over an issue, ask it around here and Dedmen gives an answer in 2 minutes 🤣

#

or any of the other scripters around here

still forum
#

Or I just scream at you to read biki

exotic flax
#

or that...

hot kernel
#

GOM encouraged me to use the biki early on-- and I do, it's my bible, but sometimes chatting here yields better and more complete understanding (usually in context)

winter rose
#

sure, ask precisions here all the way
but if you are "hey, what does setDamage do?" be ready for a flame wall 😄

still forum
#

hey, what does setDamage do?
assigns X to the damage variable of the unit
or in short, sets the damage.

winter rose
#

so unit getVariable ["Dammage"] returns the damage @still forum ! oooh, smartz

exotic flax
#

I really love that typo... damage vs dammage 😉

ruby breach
#

And then why make a damage command, when you can getDamage instead!

still forum
#

🧙‍♂️

#

get da mage

hot kernel
#

you can use,

unit getVariable ["Dammage"];

!?-- see we do learn new things all the time!

queen cargo
#

no, you can't

winter rose
#

sarcasm.exe has stopped working

queen cargo
#

Lou just made a joke

hot kernel
#

I still learned that you can't do that... 😄

queen cargo
winter rose
#
  1. and don't listen to Lou 😄
exotic flax
#
  1. Check BIKI
  2. Check source code
  3. Ask around
  4. Report bug
ruby breach
#
  1. Blame Lou
winter rose
#

Always

hot kernel
#

well the other thing is several times I've had "working" code I posted here which got majorly improved because of scathing indictments of my intellect (it's waning as I get older for sure)

worn forge
#

Answering the question of JIP
[6] remoteExec ["skipTime", 2, true] probably isn't necessary because in this case you're sending the command to the server, which (I don't think) will ever JIP

still forum
#

time is synced at join

#

jip makes no sense, also jip is only for clients, the aim was to run skipTime on server right?

hot kernel
#

thanks @worn forge

worn forge
#

Educating me re JIP: doing something like
[player] remoteExecCall ["removeAllWeapons", player, true]
means that when the command is added to the JIP queue, so when a new player joins, it's run on that player: yes/no?

still forum
#

no

#

player is a single object, it will be executed on a single player

#

which is the local one

worn forge
#

(I don't use this syntax or method as I use onPlayerRespawn.sqf to establish things)

still forum
#

so in this case remoteExec makes no sense at all since player is already local

worn forge
#

I guess I'm looking for a use case where this would be the preferred method

still forum
#

can't think of any

worn forge
#

Ha! Thanks Bohemia

still forum
#

if you want that, you should probably have that in initPlayerLocal

worn forge
#

Yeah I have a mix of initPlayerLocal and onPlayerRespawn

scenic pollen
#

Thanks @unique sundial @still forum @queen cargo for answering my question about loading extensions. Just saw your replies 🙂

hot kernel
#

"can't think of any"
that's why I was asking @still forum

worn forge
#

Actually that's not true, I do use the JIP queue for something

still forum
#

liar

worn forge
#

When server runs a mission script and uses BIS_fnc_holdActionAdd to add an action to an object, I do use the JIP flag set to true, so that a new player joining also has the holdAction added to the object

still forum
#

that would be a example of that being a thing

worn forge
#

Yup

still forum
#

but also sounds like it could just be in initPlayerLocal

worn forge
#

Well, the player client would have to know about the existence of the object, and then run a script to sync the action to that specific object

#

I guess something like publicVariable from the server attached to onPlayerConnected eventHandler?

still forum
#

dunno what you are really doing, might be that its really the most optimal way

worn forge
#

I think it is

#

[eastWind, "Deactivate Device...", "\a3\ui_f\data\IGUI\Cfg\simpleTasks\types\intel_ca.paa", "", "_target distance _this <= 2.5", "_target distance _this <= 2.5", {}, {hint parseText format ["Deactivating device...<br />%1%2", round (((_this select 4)/(_this select 5))*100), "%"]}, {deviceDeactivated=true; publicVariable 'deviceDeactivated';}, {hint 'Device deactivation aborted.'}, [], 45, 10, true, false] remoteExecCall ["BIS_fnc_holdActionAdd", 0, true];

still forum
#

oof

#

thats a blob

worn forge
#

You saying I'm spamming the channel? Others have posted more 😛

hot kernel
#

@worn forge , I don't think ded is saying you're spamming, no. Just formatting the script makes it easier to read

still forum
#

its a pile of goo

worn forge
#

I don't dare try to format anything according to anyone's standards, as there are so many to choose from

hot kernel
#

we'll take line-by-line as default

still forum
#

not gonna read your code if its too cumbersome

worn forge
#

To be fair, I'm happy with my code and it works for me, I presented it for others as context for why I'm using it

#

But because I'm Canadian, I will accommodate
[ eastWind, "Deactivate Device...", "\a3\ui_f\data\IGUI\Cfg\simpleTasks\types\intel_ca.paa", "", "_target distance _this <= 2.5", "_target distance _this <= 2.5", {}, {hint parseText format ["Deactivating device...<br />%1%2", round (((_this select 4)/(_this select 5))*100), "%"]}, {deviceDeactivated=true; publicVariable 'deviceDeactivated';}, {hint 'Device deactivation aborted.'}, [], 45, 10, true, false ] remoteExecCall ["BIS_fnc_holdActionAdd", 0, true];

still forum
#

better :3

worn forge
#

Thanks Dad

cunning crown
#

You can wrap your code in
```SQF
// Your Code
```
To make it look nicer 😉

// Your code
still forum
#

nicer dicer

worn forge
#

Between here and reddit I can't keep the formatting tips straight. You're lucky I figured out about the tilde

still forum
#

tilts me

unique sundial
#

You can global exec skipTime it won’t hurt

worn forge
#

Just ignored on clients, yeah?

winter rose
#

Nope, but soon to be re sync by the server

worn forge
#

Don't understand Lou

unique sundial
#

Will immediately sync every client

worn forge
#

I understand that skipTime is a server-only command, so running it globally means only the server will run it, it will be ignored on the clients, and the server will act to sync every client with the new time

exotic flax
#

No, both server and clients will execute it, however the server will sync with the clients anyway. So clients will technically execute it twice

cunning crown
#

it will be ignored on the clients
A client executing skipTime will see the change for a short period of time (+-5 seconds) and then the server will revert the client's time back

exotic flax
#

Even though the immediate effect of skipTime is only local, the new time will propagate through the network after 30 seconds or so.

cunning crown
#

In Arma 3 (around v1.14) skipTime executed on the server will get synced in 5 seconds or so with all the clients. It will also be JIP compatible. skipTime executed on a client will change time on client for about 5 seconds after which it will sync back to server time.

worn forge
#

Alright then the wiki is a bit misleading as it has the SE/Server tag on the top, which suggests it's only used/usable by the server

exotic flax
#

It also works in SP, but for MP it's the server who takes the lead on it (even when not executed by the server)

worn forge
#

Well yes that's clear now thanks to this channel, and reading through comments on the wiki, my point is just that the wiki is somewhat misleading on the issue.

unique sundial
#

No the biki is not misleading, SE means it should be executed on the server to function properly, which you do if you global execute it. It is just that effect on clients will be immediate with global execution

hot kernel
#

I'm actually a bit more confused now

#

either of these is what I'm trying to accomplish,

_obj addAction ["Wait 6 Hours", {
            skipTime 6;
            titleText ["Waiting 6 hours...", "BLACK FADED", 0.4];
            }];

_obj addAction ["Wait 6 Hours", {
            [6] remoteExec ["skipTime", 2];
            titleText ["Waiting 6 hours...", "BLACK FADED", 0.4];
            }];
ruby breach
#

Let's say time is 06:00 on client and server.
You execute skipTime 6 on a client > Client skips to 12:00, Server stays at 06:00 and then a few seconds later, the server re-syncs the Client to 06:00.
You execute skipTime 6 on the server > Server skips to 12:00, Client stays at 06:00 and then a few seconds later, the server re-syncs the client and the client jumps to 12:00.
You globally execute skipTime 6 > Client and Server both skip to 12:00, so when the Server syncs the Client it essentially has no visible effect

hot kernel
#

so no matter what it won't produce the day/night effect I'm looking for it will simply change the digits on the clock?

ruby breach
#

If it's Noon and you execute skipTime 12 globally, Clients and Server will immediately go to midnight. This includes sun/moon effects

hot kernel
#

I'm sorry I honestly have no idea how to skipTime globally

ruby breach
hot kernel
#

I assume that's what this does in SP,

_obj addAction ["Wait 6 Hours", {
            skipTime 6;
            titleText ["Waiting 6 hours...", "BLACK FADED", 0.4];
            }];
ruby breach
#

Read the params

hot kernel
#

but isn't that,

            [6] remoteExec ["skipTime", 2];

?

ruby breach
#

That's not globally, no. As stated in the wiki

#
targets (Optional): [default: 0 = everyone]
Number
When 0, the function or command will be executed globally, i.e. on the server and every connected client, including the one where remoteExecCall was originated.
When 2, it will be executed only on the server.
When 3, 4, 5... it will be executed on the client where clientOwner ID matches the given number.
When number is negative, the effect is inverted. -2 means execute on every client but not the server. -12, for example, means execute on the server and every client, but not on the client where clientOwner ID is equal to 12.
cunning crown
#
titleText ["Waiting 6 hours...", "BLACK FADED", 0.4];

Also this will only make the screen black on the client that executed the action, you need to remoteExec that too

hot kernel
#

oh

 [6] remoteExec ["skipTime", 0];
#

like that?

ruby breach
#

Or just [6] remoteExec ["skipTime"];, yes

hot kernel
#

@cunning crown, thanks that'll be tomorrow's problem 😄

#

@ruby breach , thanks-- that's probably the clue I need to start making sense of this

hot kernel
#

@cunning crown , looks like kk already solved that one,

[["Test Message", "PLAIN", 1]] remoteExec ["titleText"];
worn forge
#

Alright it looks like I am going to split the hair quite finely:

LE: Commands utilizing local arguments: Arguments of these scripting commands have to be local to the client the command is executed on.
GE: Commands utilizing global arguments: Effects of these scripting commands are broadcasted over the network and happen on every computer in the network.
SE: Commands requiring server side execution. Scripting commands that must be executed on the server to function properly.

In the case of skipTime, SE is a bit misleading because it has a dedicated synchronization function. In single player it's fair to say it's accurate because client=server, but it's muddy when it gets into multiplayer

ruby breach
#

for skipTime to function properly, it must be executed on the server.

worn forge
#

Yes that is what it says on the wiki - not disputing that.

ruby breach
#

It's not really misleading though. If you want time to actually skip the way the command is intended to, that's how it has to be done. Regardless of SP or MP

worn forge
#

I'm not even sure why or how I'm discussing this. I just use skipTime on the server, like the wiki suggests and seems to intend. Others have indicated you can use it in on the client, where there seems to be no real point, especially in an MP environment.

winter rose
#

Yup
in Arma 3 it is sync'ed at least

#

owner command can be used on client too, but always returns 0

unique sundial
#

Doesn’t say anything about server ONLY

worn forge
#

Well I did indeed click on the icon, as that's where I copied and pasted that text in all 3 cases

#

You're not wrong that it doesn't say server ONLY, but don't try to convince me that "must be executed on the server" implies anything else

unique sundial
#

It doesn’t but it also doesn’t limit it to server only execution, not sure where you see contradiction

worn forge
#

I am fine to officially move on from this conversation, perhaps pretend it never happened

unique sundial
still forum
#

first time hearing of "double execution bug" maybe it should be mentioned in description?