#arma3_scripting
1 messages · Page 428 of 1
"I want to check if a unit is UAV"
"Here use unitIsUAV"
"No that's wrong. use shownUAVFeed"
Oh
Even just reading the command names already tells you
thanks unitIsUAV works
Haha.
possible to modify the class HitpointsProtectionInfo armor/passthrough values of a vest/uniform/helm without touching the cfgs?
Mod, or hit EventHandler
this lockturret [[0],true];
what is the # for locking ghosthawk turrets? ive tried 0, 1, -1, and 2
nvm found this http://www.armaholic.com/page.php?id=27757
{_heli lockTurret [_x, true]} foreach (allTurrets _heli); also _heli lockDriver true;...
@meager heart once again you save the day
is there a way to prevent actionitems on scroll wheel from popping up on screen after you exit inventories?
na i mean one of the items text appears in center of screen, like earplugs, when i exit and inventory
so ace stuff
earplugs are not vanilla tho so modded items?
yeah
added with addaction?
yes
not sure really. but maybe with this extra info someone does
remember to add details of your issue.
copy that, my bad. thx
check wiki... you looking for "show window"
👍
hope that is correct name for it
yup showWindow thx mate
np
anyone have a script for unlock vehicle with lost key? arma 2 dayz epoch
@fading burrow Cheating? You will find no one here to do that for you
cheating wtf? i need a script for my server to unlock vehicle on the map that have no key anymore
How come comments are prefixed with --- in BIS functions? Is there any specific reason or is it just a standard they use
"standard" they occasionally use
Ah I see, kinda strange but looks okay
So you can find them easier while looking through the code. There is no technical reason for that.
I'm guilty of this too >.> https://github.com/CBATeam/CBA_A3/blob/master/addons/settings/fnc_initDisplay3DEN.sqf#L7
I saw this first back in another game though. Kinda helps when you're in the middle of writing something and you don't yet know how the thing will look in the end.
Fair enough
Does anyone know what the BIS function is to get the type of item something is? For example you give it a weapon it will return that? Or if an item is an attachment. I swear there was one but cant find it
Perfect, thank you
I need to create some towing system but i need the option only to appear with the 2 objects are within a certain distance between them.. i'm currently using attach to.
Cool
¯_(ツ)_/¯
👍
anybody knows ?
attachTo? yes.
I'm guessing it would help if you'd ask a question :D
Otherwise I could just ask you so you tell me what you want. Because I have so much free time
Is there a script command that changes individual soldier direction, but animated? setDir doesn't animate.
No.
Isnt there something that makes them look at direction
lookAt?
Well, there's setFormDir for AI. Maybe that is what you want.
Otherwise onEachFrame with linearInterpolate ^^ to kinda animate it
if you play the turning animation at the same time it could be ok
hehe, well, ok
actually does playing the turning animation turn the character?
I don't think so.
play turn animation and on stop setdir
I haven't see a animation that actually changes the units origin
well, walking animation moves it
are you sure? The unit is not getting back to it's origin when the animation is over?
no
yeah those have the walk move step defined in them
it moves forward
Am I misunderstanding what the "apply" command does? According to the wiki, it executes the code on each element of the array, and I've tried to write something using this.
private _array = [[0], [0], [0]];
_array = _array apply {_x pushBack 0};
Shouldn't this push 0 into each of the sub-arrays?
is there something similar to https://community.bistudio.com/wiki/uniform, to check what is in the players terminal slot?
apply creates a array out of the return value for each element.
you return nil. So it returns [nil, nil, nil] and then you overwrite _array with that array of nils
@LifeSnatcher#6222 https://community.bistudio.com/wiki/assignedItems should be in there
thx mate
Can you send me a example of what assignedItems returned? If there is any structure to it then that should be added to the wiki page
private _array = [[0], [0], [0]];
_array = _array apply {_x pushBack 0; _x};
Ahh I see now, just did the above and it now works. Cheers. @still forum
🤦
It doesn't say anything about that though, so that might become confusing to some
private _array = [[0], [0], [0]];
_array apply {_x pushBack 0;};
or
private _array = [[0], [0], [0]];
{_x pushBack 0;} forEach _array;
about what? That it returns the array of results?
and returns resulting array Like that?
It says that on the wiki and you can see it in the examples
Oh derppp, yep I understand now. Misunderstood what you said/and the wiki
So it just omits things that you don't have. Instead of printing empty string
i used hint str assignedItems player;
Like with getUnitLoadout or weaponAttachments the structure is very clear
[X, Y , Z] and if you don't have something it's just "" meaning if you want something specific you always know where it is.
assignedItems doesn't have that structure. It might be sorted though
Do you think that would be important enough to write on the wiki? How it's sorted?
I don't think that's really important
wait one, doin a quick test on it
Considering it states it for other similar commands like primaryWeaponItems/handgunItems etc I dont see why not
yeah but as I said these have a structure. As with primaryWeaponItems the 3rd element is always optics. And the first is always the muzzle attachment.
assignedItems doesn't have that structure.
Map is first if you have one. If not then compass might be first. Or any of the other items
no structure
when i removed gps it just pulled next item, so just an array. i used
_temp = assignedItems player select 4;
hint _temp;
when the slots are full its odd, map 0, watch 1, compas 2, radio 3, gps 4, nvg 5
Okey got it.
Order is
Map, Compass, Watch, Radio, GPS, NVG
Wait.. compass/watch?
Your screenshot also shows watch first
yeah i said its odd
it doesnt go left to right or right to left, just map is 0 then starts left to right
Oh and binocular at the end. apparently. But no Terminal? Or is the terminal a GPS?
yeah gps terminal
but if no terminal then nvg is 4
so just an array, not solid structure
Does it show binoculars too?
wait one
If you willing to get a solid structure for that items:
(getUnitLoadout player) select 9 // ["ItemMap","","ItemRadio","ItemCompass","ItemWatch","NVGoggles"]
That is a different order than assignedItems 😄 BI! Consistency!
If BI was more consistent. They would be called BB.
Okey.. Added to wiki
cool, i finally contributed to this channel. i dont feel so bad about sucking all the smarts from your brains. nice
Im wondering how getUnitLoadout and setUnitLoadout actually looks like. Hope its not a series of headgear|addHeadgear|removeHeadgear style.
well in engine it is
i do this for getting it all
_playerloadout = [];
_playerloadout = backpackItems _player + primaryWeaponItems _player + secondaryWeaponItems _player + uniformItems _player + vestItems _player + handgunItems _player;
_playerloadout pushBack primaryWeapon _player;
_playerloadout pushBack secondaryWeapon _player;
_playerloadout pushBack headgear _player;
_playerloadout pushBack binocular _player;
_playerloadout pushBack vest _player;
_playerloadout pushBack uniform _player;
_playerloadout pushBack handgunWeapon _player;
_playerloadout pushBack assignedItems _player;
or _playerloadout = getUnitLoadout _player 😄
does that get everything?
Yes, and more. Including the binoculars magazine for example which you can't get with other commands.
Rangefinder battery.
nice
I call it "binocular magazine", because it's the magazine of the binocular slot. As opposed to the magazine of the primary slot for example.
You can't even see that in inventory right?
You can't.
Just like you used to be unable to see the grenade launcher muzzles magazine for the primary/secondary/handgun.
Or tertiary magazines still if you make a weapon like that.
Mags for tertiary muzzles.
@exotic tinsel https://community.bistudio.com/wiki/Talk:getUnitLoadout
Theres a list of what you get from that, not sure if its 100% accurate now
Not aware of changes since it was added.
Also WTF is that TFAR comment down there. Total bullshit 😄
¯_(ツ)_/¯
@unborn ether yup thanks mate, already adjusting my code.
Now I missed the comment.
Does not work with Task Force Radio Modification due to dynamic Classes of Radios and Backpacks.
"Does not work"?!
getUnitLoadout does not work because some mod uses some classname. Sure!
im still good to use it.
Yes, that comment was weird and is now deleted.
how do i prevent this from poping up when i remove stuff from inventory? or messages like it. https://imgur.com/a/2AgNo
when you remove stuff? Or when you add stuff?
remove stuff
Probably an inheritance issue
im using a load out restriction script.
Does it check the configs of your items?
uh just now reading a thread that is addressing that. i don't have any soo I'm gonna have to set it up. sorry asked before properly googling.
@exotic tinsel
class RscMsgBox {
onLoad="if (!isNull (findDisplay 46)) then {(_this select 0) closeDisplay 0};";
};
class RscMsgBox3 {
onLoad="if (!isNull (findDisplay 46)) then {(_this select 0) closeDisplay 0};";
};
Works if findDisplay 46 is present (mission running). Simply closes itself, since it anyways logged to an RPT.
awesome, thanks mate, thanks alot
Uh...isn’t that just suppressing the warning?
Its suppressing the dialog pop-up
Yeah, fixing the underlying issue is what you should do instead of suppressing the message that tries to help you.
Yeah...unless it’s not your mod, and you don’t want to drop it.
You should drop a mod if it breaks the smoke grenades.
What about BIS problems?
Such as something related to no entry on missiles of a helicopters.
Which was present recently poping up for everyone, once someone shoots from a heli
The base game has no such problems. It's a broken mod you've been using.
It's ofc properly not to use bad addons or to fix is possible, but still.
This is not a fix. It just supresses the error message. The game is broken anyway.
Not like broken, if for example some weapon/vehicle entry is missing, its just that vehicle/weapon not working the way it should.
the game in general stays fine
I won't argue on that. Guy wanted that, I gave him the solution to his exact purpose
There's no point in arguing with me about this anyway. I know I'm right and I'm so stubborn, I will repeat the same thing for 10 years if needed.
hey peeps, I'm trying to get a player to spawn with what they died with. if I have this as an sqf onPlayerKilled.sqf: player setVariable ["Saved_Loadout",getUnitLoadout player];
do I need to activate that with a !alive trigger
Respawned EVH will help or scripted onPlayerRespawn.sqf
onPlayerKilled.sqf and onPlayerRespawn.sqf are files you create inside your mission folder.
And the script inside is executed when the player dies or respawns respectively.
that what I'm asking how does it know when to do that because its not working
I don't know what I'm missing atm
The idea is to save the loadout of the player when killed in a variable, and to reapply it when he respawns.
yup., that what I'm going for
does the file name onplayerkilled do it for it with no triggers?
The method with setVariable can fail if the respawnTime is set to 0.
ok
It's a bit complicated but essentially a bug in the game where a unit is respawned before the script of the killed thingy ran.
Well Killed EVH seemed to never let me down on this.
respawn runs before killed if respawnTime is 0, Demellion, and there is nothing you can do about it except set the respawnTime to like 0.1
what's EVH?
Oh christ...
EVentHandler.
A script executed when a certain "event" happens. Like a unit being killed or respawning.
you guys are thinking too much about this lol
Not really. I'm on auto pilot discussing this.
how does it know too exicute
Some internals that shouldn't matter to you.
You really need to know? I can look it up.
its just not working how I've read it on some forums and I'm trying to see what I'm missing.
Checked the RPT file? A script will not be executed if it contains a syntax error and fails to be compiled.
-showScriptErrors should show that too, but not necessarily.
Could also be an error that causes it to fail silently. Like a missing closing curly bracket.
ok, il make sure that's on.
Great I thought the bad module was a problem others were having 😦
along the same line i have a player killed EH but it seems to trigger on the HC player as well (somehow a mission killed the hc player entity)
Guys, got something weird with a trigger:
Activation
"Anybody" / "Present" / "Repeatable"
Condition:
player in thislist
On Act:
player setDamage 1;
Purpose to kill the player who enters the triggerzone. But since they enter it with boat, it will punch the boat to like 300kmph and sent it flying
I know you guys are trying to help but I'm so confused lol
you want to set damage level
it doesn't "punch the boat" it kills it and instead of sinking it's moving too fast and physX magic happens
also, if you use player it shouldn't damage the boat
yea but the boat doesnt explode or get destroyed
so I have very high doubts that's the trigger on act code
and players dont die :p
_soldier1 setDamage 1;
then why the hell do you say it' goes flying?
because it does that :p
if the boat enters the trigger, it suddenly flies around franticly
oh hmm
half of you post just came through lol
do you not want to damage the boat?
you could just damage the boat not the player
but if you use "player setDamage 1" wouldnt that kill all players? regardless of zone or not? Cuase every client thinks its "player" is meant? or did you actually use a var?
doesnt "player in thislist" prevent that?
nah afaik that is only the activation.
That should check if "a" player is in this trigger
But you want to refer to the list in the activation otherwise i THINK every player would be affected.
No reason why they dont die though
Or the boat is flying
what about this bomb = "Bo_GBU12_LGB" createVehicle
we used that back in the old days when we wanted to quickyl repair a bug-damaged vehicle "vehicle player setDamage 0" and tadaaa all vehicles with players inside were repaired.
well you could just spawn an explosion where the boat is
here's an old Arma 1 script i'm trying to simulate (partly)
if !((vehicle player) in _this) exitwith {};
titletext ["Extraction successful. You'll be able to spectate remaining players in a few seconds.", "BLACK OUT"];
sleep 1;
if (((vehicle player) distance EndPoint) > 200) then {vehicle player setPos getPos EndPoint;(vehicle Player) lock true;vehicle player setFuel 0;vehicle player setDir (random 360);vehicle player setVelocity [0,20,0]};
sleep 15;
player setDamage 1; // Kill the player to prevent them from talking to live players and give them spectator script ... wait 15 seconds first, to give "mission success" a chance to be detected.
sleep 1;
titletext ["Extraction successful. You'll be able to spectate remaining players in a few seconds.", "BLACK IN"];
@knotty mantle player is "the" player. Not "a" player.
Yes that trigger only activates when player enters it.
and only damages the player
So that trigger would only activate on one client? The one that entered?
yes
oh. i thought triggers were global or server only. Didnt know they could be client only aswell...
yeah but isnt the activation executed globally if not set to server only?
no
how do you do that?
It's executed locally on every machine. Which you might call global but it isn't.
yeeeeeeah. But if it is executed local on every machine. How does the activation know which player is the one that entered the trigger?
*if you dont refer to him as a variable?
player is always the local player
yeah okay. so why exactly does the activation player setDamage 1; then only kill the player that entered the trigger?
because it only executes if the player enters the trigger
other players are different units. So their player doesn't enter it
ahhh. that is the difference between global and local on every machine...
wait, i didn't seem to have checked " repeatable" when i tested it
so maybe because a group of 5 players in a boat entered the trigger, and one died causing the boat the freak out?
i mean... it's Arma
^Dedmen could that be the issue? Cause if the trigger didnt acitvate for the others it should still be available? No need for repeatable?
dunno
Triggers ¯_(ツ)_/¯
doesnt "player in thislist" prevent that?
it should, assuming non server-side triggers
hmm things to keep in mind -
- i think anybody gets triggered by animals etc too
- if people are in a vehicle, only commander of vic will show up in
thisList
@quasi thicket
Hey anyone have an idea how to fix this, it is throwing me the error "0 elements provided, 3 expected"
{ systemChat str(getpos _x);
} forEach (nearestobjects [_pos,["Land_fs_feed_F","Land_FuelStation_Feed_F"], 25000]);
_pos is probably empty
@dry owl Can you paste the entire piece of code relating to this? Formatted if you could
@subtle ore one second
} forEach (nearestobjects [_pos,["Land_SignRestrict_01_speedLimit_30_F"], 25000]); ```
thats literally it lol, basically trying to get XYZ of all 30Km/h signs on the map
You have to define _pos
player maxSoldierLoad = 5000; (in OnPlayerRespawn.SQF)
is for some reasong saying
Error Missing ; ```
I don't think the syntax is wrong, but there's zero documentation, so who knows.
That syntax is wrong.
maxSoldierLoad is a config entry in class CfgInventoryGlobalVariable. The whole thing is from a config and not a script.
So very wrong.
You can't set the load of a soldier with a script. You need an addon config for that.
in description.ext ?
Won't work.
The config entry is read from addon space only.
What are you trying to achieve?
I was thinking about casually boosting my playerbase's stamina/load cap, because they're noobs, but I probably won't bother if it's from addon space only
// initPlayerLocal.sqf
params ["_unit"];
_unit setUnitTrait ["loadCoef", 1000/9000];
Note that due to a bug in 1.78/1.80, setUnitLoadout might make a script error pop up complaing about some weird "enum" shit. Just ignore, it works fine despite the message.
This also will not work with ACE fatigue, obviously.
89%?
1000 is the original value, 9000 is what you wanted to set it to.
So I just divided them and it should be what you wanted.
Any ideas on how to make a hind patrol very slowly?
Tried using https://community.bistudio.com/wiki/limitSpeed ?
Hmm. And I just realized that you can't init on a zeus-spawned helo, anyway, so, bleh
@dry owl
systemChat str ((nearestobjects [_pos,["Land_SignRestrict_01_speedLimit_30_F"], 25000]) apply {getPosWorld _x});
@molten yacht
Hmm. And I just realized that you can't init on a zeus-spawned helo
Sure you can:
// init.sqf
{
_x addEventHandler ["CuratorObjectPlaced", {
params ["_curator", "_entity"];
if (_entity isKindOf "<heli-classname>") then {
_entity limitSpeed 100;
};
}];
} forEach allCurators;
Mmm, right, but that's no good if I only want it on the Designated Stupid Chopper For New People
I guess I could be really specific in what I place...
hmmmmm
Regardless, commy, you're fuckin' great and I love you.
Thanks for the help.
is there an easier way of checking if an object is (or isn't) within some distance of a road than with nearRoads?
@little eagle would
player setUnitTrait ["loadCoef",9000];
work?
how do I get code blocks working in here?
ahhh
if (!((_x select 0) nearRoads _roadDistance isEqualTo [])) then {
_places deleteAt _forEachIndex;
};
} forEach _places;```
ok here's what I have
_places is an array from selectBestPlaces which is why the weird (_x select 0) is there
I'm trying to go through the array and throw out positions that are too close to a road (distance defined by _roadDistance)
when I run the script it throws out something but definitely not positions near a road
is there something super obvious I am missing? I haven't really scripted in a while
You are editing the array you are going through, which is not a good thing
You shouldn't delete from the array you're looping through
Make a new array, add the positions you want to keep to it
Copy an array with +array
(See the discussion from a few days ago on the use of apply for this)
okay, that makes sense
so instead of throwing out positions that don't fit my criteria, I'll just build a new array with the positions that do
Right. Or do the same thing you're doing here with a copy of the original array. Not sure which would have better performance
You could test both
Thanks
if(_coolGuySyntaxHighlightingThing) then
{
player setVelocity[500,500,500];
};
🚀
Hey everyone, Just want to ask, with global variables, where do you personally declare them? In-file, or it's own dedicated file?
@subtle ore Tonic, is that you?
🤔
@hushed minnow Anywhere that is SQF.
Hmm, while i'm not one for lettings tools dictate my workflow, it annoys me to no limit when sqflint warns me that I may have undefined globals
you could also use misisonNamespace getVariable ["globalVarName", <default value>];
that should solve sqflint's problems
(that could also save you from possible issues if the variable is querried when it's null)
Would it be an issue if I quite a few globals that are also publicvariables
to be put into the missionNamespace
@hushed minnow
Check this http://killzonekid.com/tag/variables/
and this https://community.bistudio.com/wiki/Variables
@meager heart Not helpful to me mate.
hmm 🤔
Would it be an issue if I quite a few globals that are also publicvariables
probably not
Is the missionNamespace persistent between missions, i.e. If i edited and repackaged the same mission, those variables would still exist?
er it should not be persistant
it's no different than using thisIsAGlobalVariable = "value";
Ah, I was just about to ask that, if global variables were essentially the same as declaring it in the missionNamespace
to my knowledge yes
btw varspace setVariable [name, value, public]
can make it public through this directly
The variable space of the object is local to each client and by default changes are not broadcast.
Since Arma 2: If the public parameter for supported types is true, the value will be synchronized also for a JIP player.```
if you want persistance then write to profileNamespace
So I can essentially replace a ??
myPubVar = "someValue";
publicVariable "myPubVar";
//with
missionNamespace setVariable[myPubVar, "someValue", true];
Hello. Is there anything I could use to "ping" the server? I'm trying to create some lag switch solution and I'm looking for some command that returns values only when is able to establish connection with the server.
ultranoob yes
what i don't know is, whether sync is handled automatically after that with setVariable
since with publicVariable you have to use it every time you want to sync
by sync i mean broadcast
mmhmm, I would wager that the broadcast is done as part of the setVariable
the first time yeah, but i don't know about each subsequent modification
@native siren CLIENT: remoteExec -> 2 | SERVER: remoteExec-> remoteExecutedOwner (response)
like, if you said missionNamespace setVariable[myPubVar, "someValue", true];
Will give you exactly a ping
@unborn ether thanks
if you repeat the setVariable with the public flag then it should ofc
@inner swallow Oh, that, I believe you have to do manually, since regardless of how you modify it, it shouldn't propagate until you call publicVariable, or the like
yeah, that's what i was thinking too
@native siren Specified more, take a look
@inner swallow Thank you for your help!
cheers!
variables in missionNamespace already global...
publicVariable will just sync var with all machines, including jips
yes mission namespace is cleaned every mission. only UI namespace (session) and profile namespace (hdd) can persist between missions
@cedar kindle parsingNamespace too 😉
whats parsingNamespace for?
parsingNamespace holds data until the binary is destroyed, which means until your server/client goes down.
Oh, so it's like the executables own namespace
it's for preprocessor __EXEC, config parser namespace
Well in terms of BIS .. yes ^
don't worry about it tbh
so if i were as devious as to put a wasTempBannedRecently = true in a bunch of servers, then they could check for that and not be able to join my servers until they restarted arma?
@hushed minnow In that way you better use profileNamespace with some timestamp
mhmm, Yes, I was just trying to think about how anyone would actually use it?
Is there a wiki page describing the different namespaces and their uses?
so they don't have to be recompiled between missions
@hushed minnow In short
missionNamespace exists while mission is on
profileNamespace exists until user/server loose its profile storage
uiNamespace|parsingNamespace exists until binary is destroyed, they've just used for different purpose.
sldt1ck - Today at 03:25
@UltraNoob
Check this http://killzonekid.com/tag/variables/
and this https://community.bistudio.com/wiki/Variables
UltraNoob - Today at 03:26
@sldt1ck Not helpful to me mate.
😀
Is there a wiki page describing the different namespaces and their uses?
gg well played
I have been trying to map map Icons for a Life server but some reason its not working I packed it up as a PBO and everything but it isn't showing up this is my config.cpp class CfgMarkers
{
class Flag
{
name = "A3PAL MapIcons Shop";
icon = "\A3PAL_MapIcons\data\shop.paa";
color[] = {1, 1, , 1};
size = 32;
shadow = true;
scope = private;
};
};
Is there any getter for current scripted volume, fadeSound for example?
😉
gonna link it from fadeSound for dummies like me
👍
So i got this from BOOTCAMP mission: this creates a camera and it renders that camera to the monitor
["initialize", [BIS_timeTrial_monitor_1, 0, [14335.75,16223.96,1.77], [-80557.67,47698.36,-2121.23], 0.35, "rendertarget0"]]
can somebody explain to me how to get cords ? i wanna use this for a CQB facility that i'm working on
@ornate pawn Right click an area in the eden editor -> Log -> Log position to clipboard
it'll copy an array [x,y,z]
hey guys, which channel would be more appropriate for a code-review?
this one if it's sqf
This is a link to my PR but its just the one file I want reviewed
https://github.com/DUWS-R-Team/DUWS-R/pull/167/files#diff-2cff08e2d648d782076073f6552e60d4
Uhm... Ask the maintainers?
I am the maintainer 😫
This is actually the first time i've asked anyone to review my work since its sooo new.
All the other devs are gone
@queen cargo, Where do I know you from? are you a dev too?
Woah! amazing, I remember talking to you about a bug with arma.studio now
Is there a way to get ai to call up a bi support module? I'm thinking helicopter transport in particular
Nevermind, i think i can do this with a waypoint spider web
@molten yacht That would make the players load affect stamina/fatigue 9000 times as much. I wrote 1000 divided by 9000, which is 0 point 1 period 1. So a reduction to about 11%. This value is not the same as the max load of a soldier. It's a multiplier (hence "Coef") for stamina/fatigue only. The maximum load can only be changed by addon config as I already said.
Okay, I'm back. Now i can't figure out the selection syntax for addWaypoint. All the examples i can find have _wp = _grp, but substituting the group name in any way just seems to produce errors (total scripting noob, bear with me)
@cyan pewter _grp is the name of the group.
_grp addWaypoint [position player, 0]; is the command bit
which returns an array as described in the wiki
which gets stored in _wp, in the example
i.e. general syntax is groupName addWaypoint [center, radius, index, name]
so if you have something like _grp = group player; before you use _grp with addWaypoint, then it'll work
but you could also do (group player) addWaypoint [position player, 0];
if that makes sense.
this will make a waypoint on the position of the player for the player's group
(which will probably be completed almost instantly)
must have made a typo... could have sworn i tried that already
okay, now i want to define the position using a command. ive got th1 addWaypoint [_position = getPosATL a1ftl findEmptyPosition [50,1000,"O_T_VTOL_02_infantry_dynamicLoadout_F"]];, which im sure is filled with syntax errors
Hello I try to run one of the examples from remoteExecutedOwner wiki but it doesn't want to display anything. What am I missing?
{
// in this scope, the remoteExecutedOwner equals clientOwner of the sender
// so using it as target in remoteExec will send response right back at him
[
time, // mission time value on the server
{
hint format
[
"Request recieved!\nMission time value on the server is: %1",
_this
];
}
]
remoteExec ["call", remoteExecutedOwner]; // server response to the sender
}
remoteExec ["call", 2]; // send request to server```
_position = getPosATL a1ftl findEmptyPosition [50,1000,"O_T_VTOL_02_infantry_dynamicLoadout_F"]
that's not ... no 😄
put this in a separate line and then just use _position here
_position = (getPosATL) a1ftl findEmptyPosition [50,1000,"O_T_VTOL_02_infantry_dynamicLoadout_F"];
th1 addWaypoint [_position, 0];```
although it's interesting, the LAND waypoint should be doing this automatically
it has to be a load waypoint, otherwise the helo takes off before everyone gets in
_position = (getPosATL) a1ftl findEmptyPosition [50,1000,"O_T_VTOL_02_infantry_dynamicLoadout_F"];
Questionable.
...addWaypoint _position - "0 elements provided, 3 expected", ...addWaypoint position _position - "generic error in expression"
@native siren Did you test this on a dedicated server or local hosted MP?
also causes a major fps drop
@little eagle dedicated
Well, the script SuicideKing posted has a syntax error. There can never be parenthesis enclosing getPosATL without any argument on the right side.
SEM, do you use CfgRemoteExec in your mission?
yes
Then you have to white list call command.
oh, i didnt even see that. i was still using it without parentheses, like the example on the wiki
Remind me, what did you try and it errors?
_position = getPosATL a1ftl findEmptyPosition [50,1000,"O_T_VTOL_02_infantry_dynamicLoadout_F"]; th1 addWaypoint _position error = "0 elements provided, 3 expected"
_position = getPosATL a1ftl findEmptyPosition [50,1000,"O_T_VTOL_02_infantry_dynamicLoadout_F"]; th1 addWaypoint position _position error = "generic error in expression
The syntax of addWaypoint is
groupName addWaypoint [center, radius, index, name]
according to the wiki, not
groupName addWaypoint center
Radius is mandatory, index and name are optional.
also if you need just move group _group move _position; 😉
@little eagle Like this?
class Commands {
mode = 1;
jip = 0;
F(addHandgunItem,ANYONE)
F(addMagazine,ANYONE)
F(addPrimaryWeaponItem,ANYONE)
F(addWeapon,ANYONE)
F(setFuel,ANYONE)
F(call,ANYONE)
};```
No idea. This is macros from some mission I'm not familiar with. But it looks good to me.
If you actually white list call, might as well get rid of CfgRemoteExec alltogether though.
lol
im also missing brackets
should I just put this code into separate file and whitelist it instead?
and then just call that function
You mean make a function out of it and whitelist that function instead of the call command? Sounds good. Less network traffic and you don't have to white list call.
@cyan pewter
private _position = getPosWorld a1ftl findEmptyPosition [50,1000,"O_T_VTOL_02_infantry_dynamicLoadout_F"];
th1 addWaypoint [_position, 0];
It lagging is to be expected, because you search a one kilometer radius.
uhh, actually i think i got it
findEmptyPosition with range 50-1000, will slightly ruin your fps lol
Not really. It's one command. All it does is freeze the game for one frame to then return to normal fps.
out of curiosity, what does making it private do?
Sets the home scope of the variable, so the game has to not go through all previous scopes to look for a variable named "_position" to potentially overwrite.
okay, thanks. now to add landing and wp synchronization
well thats interesting
i turned down the search radius and it failed to find a position, causing the rest of the script not to fire either. is there a way to loop it while expanding the search radius each time, but get it to stop once it finds a suitable lz?
@hushed minnow I didn't comment again that I already commented. So if you did the same thing in a later file I didn't comment it again but my older comment still applies
@still forum Just soooo much of it is legacy code that I don't even know who wrote it, but all are valid points!
Seeking execVM everywhere already screams legacy code at me 😄
yeah.
It's not really a new way
You just shouldn't execVM scripts that you run more than once. Because they are recompiled everytime. And compiling scripts is expensive
I kinda had a hunch about that too, but since this wasn't a script that would regularly run (once every 10 minutes), the benefit would've been negligible.
ExecVM is the same as spawn afaik
But if it isn’t, then you need to update the wiki or something you madman.
It does somewhat the same. But differently.
Exec VM preprocesses and compiles a script and spawns a new instance.
spawn takes a already compiled script and spawns a new instance
kind of a shame we don’t have a short command for ccppfln
the heck is VM short for anyway
virtual machine?
doesn’t make any sense tho in this regard
explain
alright
isnt it more like execution context for the script engine ?
how is it a vm by vm definition
VMContext is a different thing 😄
is it short for virtual machine tho
lame 😒
https://en.wikipedia.org/wiki/Virtual_machine#Process_virtual_machines is what a ScriptVM is essentially
There is also the Java Virtual Machine. Which is also not according to wikipedia's VM definition Virtual machines are based on computer architectures and provide functionality of a physical computer.
I’d buy the script engine being referred to as vm proc but why each script instance
Because each of them is a VM
If you run system VM's you also call them VM's. And not system instances running on a VM (host system)
because the host system is not a VM
exactly
The SQF engine is not a VM. It runs VM's
Does it?
yes?
Name is pointless though. May aswell call it spawnVM.
There’s an exec thing though
Yes, and it creates a sqs vm.
For consistency it should be named like that.
I would prefer without the VM though. But they had to name execVM differently because exec already exists
There are no SQS VM's
execSQF
There are no SQS VM's
https://community.bistudio.com/wiki/diag_activeSQSScripts
Already an ingame exec command
Yes, and it creates a sqs vm.
They aren't called VM's internally though
Would be bad design if you ask me to have them be called the same thing
How are they different?
They are not compiled
exec could decide by file extension wheter to use sqs or sqf.
Sqf is gonna be gone by a4 no point spitballing
🤔
Or maybe spawn with string argument?
this
Please tell me more about A4. You seem to have more information that anyone else.
That is a very weak argument.
So far it is speculated that we will get Enscript. And Enscript still supports SQF to this day.
Huh
Ofcause you can further speculate what will happen with the language that we speculate to get in a speculated Arma 4 game that might exist or not.
How do you know Enscript supports SQF?
Enscript documentation has a enscript command to execute SQF code
oh, I see. But isn't that like years old already? From Dayz, right?
yes
Haven’t seen much for documentation of it
And lucie
what's that
oh ok
Interesting, since in the dayz dev interviews they said SQF won't be compatible with Enfusion/Enscript 🤔
or wait, i think he's saying there's no automatic conversion
not that it can't run it or whatever
I think he is saying it is a different thing and there is no way to use one in place of the other. He goes on to also say that modding is also exceptionally difficult to do safely in Enfusion and they haven't determined how they will go about doing that yet. This matches what I have suspected and have felt all along unfortunately. If you fix the multithreading issues then you also introduce complexity and rules on the modding and scripting that limit what can be done and make it harder to mod.
Really interesting video I'll definitely get deep into it as it says a lot of what the future is likely going to hold and those two tidbits are already pretty dramatic impacts were it to come to the Arma series in that way.
What I've seen from enscript so far is singlethreaded
there are "threads" but they are equivalent to SQF
I do remember them implying that a lot more stuff will be scripted instead of hard-coded, so in some ways modding will be easier
Yep.
Already seen that being the case in DayZ
Depends on how fast enscript actually is though. The faster it is the more stuff we will see in open-source Enscript rather than closed source engine code
Will DayZ standalone support mods
Yes 🙄
Yes. Mod support is supposed to come out together with beta
When is that happening
XD
I think next target was Q1 2018. But dunno
I've only heard 2018, but it might also mean 2019.
It was planned for last year. So I don't think 2019
It was planned 2016 too... 😃
┬─┬ノ(ಠ_ಠノ) Calm down please
Yeah seems to take a lot of time I feel like Butter Lord will come out before this
Yeah their video just said 2018 iirc
Can someone tell me if setVariable with public argument as client ID number reliable or not?
Last info that I got about that is that it's not working
But I don't know if whoever said that actually tried it
Need to check it
@unborn ether @still forum
Quiksilver has been using setVariable clientId successfully in the past.
write faster
It's unrelated to what I was telling you.
If you fix the multithreading issues then you also introduce complexity and rules on the modding and scripting that limit what can be done and make it harder to mod.
But the community already made more complicated things than Arsenal or Zeus. If this were true, then it'd also mean no more scripts like those. Also, the campaign etc. is all scripted. Something has to replace that.
I don't see how multithreading would be a problem really. You have the same issues already with SQF pseudo threads, except none of the benefits.
multithreading makes everything harder. And makes things that actually don't care about multithreading slower
It sounds ridiculous to me that some silly scripts even need actual multithreading.
Wud St enscript b fst
@peak plover you gotta cut the cool kid slang man, no one can understand you and your lifer talk
rekt
STFU!!!!!!
😉
Angry reaction confirms the accusation.
ok now on pc
Would singlethreaded enscript be fast?
Multi threading is out of the question, right?
Don't think anyone knows without trying.
Would it be possible to make a dll extension for a3 that is a new sqf thread?
Like intercept?
Apparently you can utilize the editor in dayz already, it's very hacky though. Bi doesn't endorse it
Intercept gives you multithreading. But I haven't found a real use for it yet
enscript is faster than SQF for sure. So yes it will be fast
okay
multithreaded code isn't any faster. If anything then it's slower
Like, place a packet lf scripts and resources in the root and dayz picks right up on it.
okay
So i fear it may be too easy to modify things
-filePatching
Arma also does that
place a pbo with scripts and a config in addons folder and it automatically loads it
True.
I'm sure they'll protect it properly
Eventually, but as of right now people are still utilizing it.
lol
I can think of stuff for intercept to do
Can I make sqf script and intercept use it?
yeah
and PFH
Wouldn't calling SQF from intercept be like using a regular command? Or how does that work?
calling SQF from Intercept call's the script in unscheduled using isNil
k
basically. Except fastCall is enabled. In which case it does more complicated stuff but the speed of the actual script won't increase
Does an event handler have any performance impact when it is not being fired?
no
Nothing that's even supposedly negligible?
What?
It doesn't have any performance impact. 0.
If the event doesn't happen then nothing happens at all
How are event handlers handled in the engine? Are they sort of like loops waiting for a condition to be met?
@subtle ore You can answer that yourself
Just read what I wrote 3 minutes ago
then use your brain properly.
They're an array in memory that is iterated over when the engine does certain stuff. Like firing a weapon.
🤷
Eventhandlers themselves if they fire are stupidly expensive. But that's just because their implementation is stupid
Alrighty then.
Well, unless you use like BIS_fnc_addStacked or CBA_fnc_addClass, because those are not stored as strings and need no compiling.
So this only applies to add(Mission)EventHandler ctrlAddEventHandler and displayAddEventhandler.
re: multithreading - depends entirely on the workload. If they have to sync threads a lot then it will negatively impact performance. https://en.wikipedia.org/wiki/Amdahl's_law
but even then it's not all or nothing
lol
You have to sync at some point in Arma. But your code won't run faster in a seperate thread.
You'll just be able to run more of your slow code at once
oh yeah, of course
having MT in user scripts sounds like a niche use case
but i'd assume stuff like radio simulation (TFAR/ACRE) could benefit?
There is only one guy who uses Intercept to run properly multithreaded scripts.
Yeah. They could benefit slightly I think
I was thinking more in terms of their physics engine, etc
Not really then
TFAR's most time is spent harvesting peoples positions
ACRE does their "physics" calculations in the Teamspeak plugin.
ah, er. So by "their" i meant BI's physics engine for the world 😄
nigel was talking about bullet
idk they said they want to avoid third party
alganthes greates quotes update >"but even then it's not all or nothing" 😄
An inhouse solution would be great
No. GPU not GGF
Sanic fast?
I don't think that is how this works, nigel.
Ohh
what i meant, sldt1ck, is that there will probably some algos that'll benefit, and some that won't, and MT implementations usually give you ways to have serial blocks inside MT blocks
or switch between modes
so there will probably be opportunities to use it if they find that it's worth it
maybe even AI pathing could be sped up, idk
no..you was on point there 👌 ... just funny little conclusion, SuicideKing 😀
multiple AI's pathing in parallel is a good idea
Graphics cards a lot faster so why don't we use that to do all the expensive stuff
They aren't tho
afaik it depends on algo
So you be sayin CPU be faster
in serial tasks, yes
(not to mention the latency involved in transferring stuff to VRAM and back)
Alright alright alright you talked me out of it
might be good for physics though
Well I think there could be a reason they stopped either it wasn't selling enough or it wasn't you know good enough nowadays
but i'd hope the GPU is busy rendering 😄
although they could use the IGP for compute, theoretically 🤔
Exactamundo
What are usually the most expensive things in Arma and are they all are running on like the same CPU cores
95% of Arma is singlethreaded
But did uses all of my course I mean this going to be an explanation
Basically everything runs on the "same core" (It doesn't at all. But doesn't matter)
Is it just like virtually using the like possibility of having 8 cores or
That sentence is gramatically invalid
bulli
Maybe everything goes to like a bottleneck and then from the bottleneck to the CPU cores
But how does it do it
As I said 95% runs serially in one thread
one thread might run across all CPU cores though. But that doesn't make it run in parallel
Yes yes yes one thread using many cores
That's what I mean it's thread is the bottleneck through which it gets to the course
I played a little with DayZ standalone with the latest version and I think it rained really good considering it has like Dynamic Shadows for like the F layer and stuff and it looks a lot good
I wonder how good does infusion script run
Enfusion*
I'm using the Google talk to keyboard on my phone
Lazy
Hell yeah I'm lazy is there something like that for commuters
just text
the entire engine is one bottleneck
:enginelimitations:
Why do bottles have bottle necks anyway?
I don't text and drive I'm just practicing for the inevitable robot takeover of the world I just want them to understand me
makes it easier to pour i guess
they don't need to understand you
haven't you seen terminator
They'll harvest your brain electricity for some reason though.
For sure they do
I've seen that movie.
@little eagle Do you have a throat large enough to swallow all that water the neck stops?
Yeah try pouring from a cup homie
Everything has a purpose stop trying to reinvent the wheel
I'm trying to destroy all wheels, because they're stupid.
Well the wheel in the sky keeps on turning, you out to destroy that too?
I hate the Wheel in the Sky but at least it's some proof that Earth is flat
🤔
@meager heart 
Crunch time for the tanks TLC baby
hopefully
Big party afterwards tho
🎈 🍰
I'ma happy for them
Going out with a bang
With that t72
🤞
Dude they have to drive that tank into hooking DLC video it's the tanks DLC and t-72 is a dank
Damn I've misrepresented my words because of the robot misunderstood me
Me 2
I need some feedback on how I should approach the following problem:
I'm trying to come up with a fast and reliable way to generate pseudo-random numbers (from 0 to 1, for now) using a given seed
I tried using random with the syntax that uses a seed and a X and Y coordinate, but with ArmA's number accuracy (or inaccuracy rather) it doesn't produce good enough results
the 2 options I see at this point is to either implement an existing PRNG algorithm in SQF (fuck me if I have to do this) or writing an extension, which means I most likely won't be able to use it in an MP environment (and definitely need an addon for it at that point)
does anybody else here see a 3rd option? if not, which one of the 2 would you pick?
@half inlet Extentions alone can be loaded via server or client root, no need for an addon necessarily
that's good news, though there's still the problem of finding a server provider that lets you upload custom extensions
from my experience most providers don't allow this, some do provided you send them the source code (so they can compile it)
Yeah not sure the whole deal with that. I've always done my own installation. Your provider should be reasonable and allow you to upload it (like you said) given source and it's functionality
in my specific case, an extension would be the last resort - ideally everything should be handled in-mission so as to have few to no requirements (since this would be for a group I play with)
I think I'll go with an SQF implementation of one of the many algorithms then, see how well that goes
I'm just concerned about the performance, but I might be able to work around that eventually
@still forum What did you mean when you said
"NEVER end a script with a variable assignment. That will trigger the only real SQF language bug in existence."
https://github.com/DUWS-R-Team/DUWS-R/pull/167#discussion_r169302889
the only real SQF language bug in existence?
no clue what the actual bug is but to "solve" whatever it is:
_art = [player,"fob_support"] call BIS_fnc_addCommMenuItem;
_art;
with or without the semicolon at the end doesn't matter 😛
Yeah, it works and its been like that since I took over the project.
As I understand, the last statement is what is returned, but we discard the return anyway.
¯_(ツ)_/¯
Any fans of genetic algorithms here?
sqf natural selection problems ? 😀
😂
Ah yes its done
Where can I upload this pointless work of art to share with you guys?
Genetic Algorithm for generating a specific string written in sqf
the most pointless thing ive ever written, sqf can't process quick enough to do machine learning, but it was fun for my first time writing one from scratch.
What does it mean
literally this https://en.wikipedia.org/wiki/Genetic_algorithm in sqf
I wanted to prove to myself that machine learning could be done in sqf, so i did this
But what do you get from this?
literally nothing of value
It creates a random pool of strings
and uses genetic-like programming to generate
I ❤ ArmA
I don't understand machine learning
I hardly do
So what does this do Try to generate I love arma by doing random until it gets close?
it treats each character in each string as a peice of dna
just like how all the characters make a string, each character makes a "dna" strand
Why call it dna
It should be called string reproduction sequence
I don't understand dna as well btw
I really don't understand enough of it myself to explain it well to be honest
I used this as a way to help teach myself it
Cool stuff non the less
Yeah I learn from doing something vs reading/watching something
and I was like "why not use arma"
and all the reasons for why to not use arma made me want to use arma more
The easiest and most well thought out language - SQF
lol
But in layman's terms, it's string reproduction through randomness?
I wonder now, how to utilize this
bookmark it...
you can ask later somewhere "Any fans of genetic algorithms here?"...
#arma3_scripting -> #codingperverts 😄
Can someone please tell me how to get the vcom ai menu back in game?
That's mod related, not like #arma3_scripting. Try asking in #arma3_questions
how to get the vcom ai menu back in game
press escape > vcom menu
option 2: read what commy said ^, press escape > vcom menu
i know there is vcom ai tutorials on youtube, might be helpful for you, DavidNickisson
also check forum
@half inlet To the pseudo random number generator... You say Arma's Number accuracy isn't enough. You won't get any better with a SQF algorithm or an extension. Floats are floats. Every number in SQF is a float. You can't change that. (okey.. Theoretically you could... But I don't think you want to go that route)
@hushed minnow If you discard the result and you are 100% sure no one in the world who might use that function might try to store the result (0 = call ... also counts. And some Idiots do that everywhere.) then it's okey.
Otherwise you will kill any script that tries to store your return value because you return nothing. You don't even return nil. There is nothing there. Pure nothingness.
There is nothing there. Pure nothingness. - The description of a Flat Earther's head
@still forum So your point is, that in the event of someone doing something stupid, I shouldn't leave that as the final line, just in case someone does something stupid just like saying nil = true
So does that mean the last line should just be nil
Most performance efficient would be a number. Because nil is a full command that would get called.
Most people just put nil at the end. I guess you could also just return the variable you just assigned at the end or whatever
Or just return SKDFJDSKJEYGIJFJRSIKJSEFKADJFG
@still forum So just 0 then, like unix zero
yeah. Or 1337 or whatever 😄
If 3 microseconds for a call to nil are not too much for you you might aswell use nil
@still forum Is nill faster than nil?
Preferable i think ill call noop to the cpu /s
Fastest way would be to use my SQF optimizer and just let it add a push instruction automatically if a function ends with a variable assignment ¯_(ツ)_/¯
nil is 0.3 microseconds on my PC. So is nill
How fast is 1 ?
That should be faster. Otherwise that might be the limit of diag_codePerformance
Which means that my 0.3 microsecond for every command call might be wrong 😮
0.2micro
Puh... 😄
😮
nil alternates between 0.2 and 0.3 microseconds
nill between 0.3 and 0.4 microseconds
0 stays at 0.2 microseconds
true ?
Does true/false have similar time?
0.3 microseconds
And alternates between 0.3 and 0.4 when accessing a variable assigned true/false
So looks like commands are faster than variables
You know who the real winner at the end of the day is?
Me
damn it, I was trying to be all shocking and stuff
true/false are SQF commands. So about same as nil
right
Though nil has one less memory allocation. But that's a pool allocator anyway. Atleast on Windows
private local variables are faster than both though
Well. I guess depends on how balanced the hashmap is...
I should do more micro benchmarks 😄 \(o_o)/
How about not assigning the return value at all. 🤔
I think in his case he was assigning a global variable
And the script isn't supposed to return anything
So the function ends with an assignment?
assigning a local variable on the end of a script is ofcause a different thing :D
Yes
Ending a function with an assignment makes the game bug out when you call the function and assign it's return value to another variable.
As I already explained an hour ago
Just put a nil at the end. Using an undefined variable like "nill" or "noop" makes it complain in scheduled enviroment.
Dedmen, any progress on that blog thingy?
Need someone who can design stuff to make a main page
I guess we could copy ACE stuff? Or bux could?
Don't ask me. If I made a site, it'd look like Stallman's.
Same for me
I think mine looks okay
Good to finally see confirmation of a new Arma on Enfusion
Eh?
Seems like confirmation of a new Arma by the looks of it
Not sure if this is old news to some
I think @still forum said something about an engine last night
They've been talking about Enfusion for a while. First time they've officially absolutely said they ARE working on a new Arma
Although, I'm not too excited
They said they'd make it less ARMA so they can put it on consoles
At least that's what it sounded like: "Arma 3 was designed for PC and a port would not do it justice. It would need to have been considered from the start. Our new Enfusion engine has better multi-platform support, so it will be more feasible for potential future Arma games."
The way I see it, the only way ARMA can be ported to console, is to remove all that makes it ARMA
I don't see how. Of course their going to keep PC compatibility as a main priority in terms of making it the most feature packed and moddable
"pc compatibility" is a very low bar for "all that makes it ARMA".
Oh well. If it'll suck, it'll suck. Can always leave the sinking ship and play something else.
i hope "crossplatform" never happens for arma
@still forum https://github.com/acemod/ACE3/issues/6072
You were tonking of this.
AND OF COURSE PARAM FIXES IT https://github.com/acemod/ACE3/pull/6160/files
👍
shouldn't param also work with any value? i mean ... params is also not complaining if it gets passed non-arrays
Yes. They both take ANY
meaning the [...] is just adding useless overhead
one makeArray instruction in a postInit script yeah
like 2 microseconds in a 20ms+ total postInit
Wow. Just checked a RPT from exile I had lying round. Total >15 seconds of postInit
could somebody check what
missionNamespace setVariable ["foo", 1];
missionNamespace getVariable ["foo"]; //this outputs
missionNamespace getVariable []; //this outputs
missionNamespace setVariable ["foo"]; //this outputs
missionNamespace setVariable "foo"; //this outputs
missionNamespace setVariable []; //this outputs
missionNamespace setVariable [1, "foo"]; //this outputs
The [] are not useless.
private _vis = _object getUnitTrait "camouflageCoef" param [0, 1];
private _vis = nil param [0, 1];
private _vis = nil;
nil as input of any command fails. This is also true for param (unless _this is undefined and you were using the unary version, because _this was not really the true input).
This means _vis would still be undefined and the whole thing is unnecessary overhead that doesn't fix the bug.
Really disappointed to read this here. I thought we went over this years ago.
Yes, any command fails if the input on either side was nil. Even if it accepts type ANY. That has nothing to do with it.
hah ... always thought ANY would actually acceppt nil ...
was logical for the others ... though ... silence fail is still stupid
but for ANY i expected different as NOTHING is also an actual type
Yeah. Anyway,
[<expression-potentially-reporting-nil>] param [0, <default-value>]
is the fix for it.
you got arma running @little eagle ?
Any if construction is slower.
Not atm.
missionNamespace setVariable ["foo", 1];
missionNamespace getVariable ["foo"]; //this outputs
missionNamespace getVariable []; //this outputs
missionNamespace setVariable ["foo"]; //this outputs
missionNamespace setVariable "foo"; //this outputs
missionNamespace setVariable []; //this outputs
missionNamespace setVariable [1, "foo"]; //this outputs
You want the error messages?
yup
and if they work
L1 works, the rest will fail.
but error msg and is it just a warning or an actual terminating error
missionNamespace getVariable ["someundefined"]; you know if this will error? there is no default afterall
2 expected, 1 provided
Yes ^
Always error
Actually...