#arma3_scripting
1 messages · Page 392 of 1
@limpid pewter go to %localappdata%/Arma 3/ and find the latest .rpt file.
ok thanks
^that, there's even a plugin for sublime to open the latest one
Alright, will use that in future to paste code/errors
When developing, turning on the 'show script errors' in the arma 3 launcher parameters is a good way to spot them.
Coding without a way to verify what you're doing is as good as driving your way home blindfolded.
@still forum : "_objPos is wrong. The error is not inside the while loop.
Your _objSpwnPos is wrong(edited)" Yes, so like i said the first time it is fine, it recieves the parsed variable as position array, but the second time the loop runs it replaces the postion stored in _objPos with my player object ID.
@cosmic kettle Yeah. Should have looked at this before hand really
the next time your code is remoteExec'ed
btw params can also type check.. You should maybe use that
Am I the only one who actually avoids while wherever it is possible btw?
I don't write scheduled stuff.. so.. no while at all
ok happy to know. lol
Though I only wrote Intercept stuff the last few months.. So.. I don't really do SQF currently 😄
Just scanned to be sure, 1 while in +/- 3000 files. Yep that's what I thought lol
Yeah, i think i will just have to fiddle arround with it a bit more myself. It's weird tho because i have an almost identical function that runs in almost the same way and it works fine.
params ["_objPos","_Dir"];
mld_fnc_healthMain = {
if ((damage (_this select 0)) > 0.005) then {
_health = damage _unit -0.005;
_unit setDamage _health;
};
};
_count = count medKitArray;
if (_count > 14) then {
deleteVehicle (medKitArray select 0);
medKitArray deleteAt 0;
};
_obj = "Land_MetalCase_01_small_F" createVehicle [0,0,0];
_obj setPosASL _objPos;
_obj setDir (_Dir - 90);
medKitArray pushBack _obj;
while {!isNull _obj} do {
_units = nearestObjects [_obj,["man"],3];
{
[_x] call mld_fnc_healthMain;
} forEach _units;
sleep 0.5;
};
I already told you your problem is not in that function.
```sqf
not
```
sqf
Just saying
yeah ik, didn't want to work
oh ok
ok dedmen, idk will have to check. Both of those functions are executed in the exact same ways ,with the exact same variables, which is the weirdest part
private _obj;
@cosmic kettle no
params def private?
yes. but still no
yeah just noticed _obj not in params
besides good style
Sorry to bother you again with this problem, but can you quickly see if there are any errors with this CfgRemoteExec ? ```sqf
class CfgRemoteExec
{
class Functions
{
mode = 1;
// Ability to send jip messages: 0-disabled, 1-enabled (default)
jip = 1;
/your functions here/
class healthMain
{
allowedTargets=0; // can target anyone (default)
jip = 0; // sending jip messages is disabled for this function (overrides settings in the Functions class)
};
class ammoMain
{
allowedTargets=0; // can target anyone (default)
jip = 0; // sending jip messages is disabled for this function (overrides settings in the Functions class)
};
};
};
I ask mainly because there is obviously an issue with how the variables are being parsed into the functions, and i just want to check all things that could affect this
mode 1 is broken, i'm fairly sure BIS never fixed it
it won't affect what you mentioned but will completely fuck networking
it increases network usage for remoteExec dramatically
they miiight have fixed it, or not
ah ok
the issue have persisted from 1.52 to 1.64 last I checked
i shall research on this
looking at ur snippet from earlier u use mld_fnc_healthMain. so i believe u would want to do class mld_fnc_healthMain in the remoteexec cfg
oh fuck. hahaha holy shit, how did i not spot this haha
Thanks connor. I have a function as a variable within the function as a file, with the SAME name hahahaha
i need to descramble my brain
stop using inline functions saved in global vars for one
Ye, more of an experiment in this case
{ if ((side _x) == West) then {_x setcaptive true; _x playmove "AmovPercMstpSsurWnonDnon" ; _x disableAI "ANIM";}; } forEach allUnits;
If run, this should make all blufor units put their hands on their heads, stop moving, and stop being shot at, correct?
if it's local to the unit then yes
That reminds me of "coming to america"smiles
locality is fairly simple once you "get it"
units and objects have an owner, some commands require that they are executed on the owner's machine
How does i remove a unit of the count in a array?
wat
Their owenr is the machine that spawned them unless otherwise set?
ah ok, i was just wildly guessing
Like
selectRandom [playersgroup] setdamage 1
in playersgroup there is 3 players and the arays are [Player_1, Player_2, Player_3] i want to exclude the Player_1 from that count
yes, but can be any other player
playersgroup=if not player_2, player_3 maybe?
nah, you'd use array select range and then use selectrandom
but i'm not sure what he want to do so it may not fit what he needs
i dont wanna the selectRandom to chose player_1
yes, but the issue is that player_1 could be any player from my point of view, because I don't know how you get that array or why you want to exclude player 1
"A bit more complicated than that" is an understatement, but thanks :p ill play around with the script in the environment i need it in, see how it goes.
This is the goal i think: When there are, lets say, 10 players, all but #1 (or #5) shall be exluded from randomly being hurt
uhm, or better said, all but #5 shall be excluded from being chosen to get damage
think of it this way, there can only be one owner of an object / unit at a time, players are always local, light sources are always local
the tricky part is finding the machine where the object / unit is local
and making sure the commands you use actually take global arguments or if you need to execute it where the object / unit is local
that was only a example, it could be anything
@astral tendon would it not be easier to select that exluded player before adding him to the array of randomly chosen hurtable players?
So that player doesnt even get added in the first place
roque, is it always the first player of that array, no matter what?
i just wanna know if i can remove some object from the aray
that was just a example
urg
how the hell do you want to remove something you can't reference?
selectRandom [BuchOfAIGroup] setdamage 1
the aray: [AI_1, AI_2, AI_3, AI_4]
hm, insert if chosen_player=player_x then skip set-damage-part before setDamage=1?
need to remove the AI_2 from that conting so it does not get chosen by the selectRandom
You know, tear apart the chosing and the setdamage and insert a selectorthingy
I get that, but why AI_2 specifically ?
and do you have it saved in a var so you can compare it?
because i like him.
because if it's just that you can use:
array apply {_x != _myVarWhereAI_2IsStored}
that took long grins
so it would be
selectRandom [BuchOfAIGroup] apply {_x != AI_2} setdamage 1?
no, apply returns an array
well, yes it would be but you're missing parenthesis
i'm fairly sure selectrandom would execute before apply here, plus it's difficult to read
selectRandom ([BuchOfAIGroup] apply {_x != AI_2}) setdamage 1;
no missing )'s lol
No matter what, where or when, there are never enough smiles!
It is kinda re-assuring that in programming at least, every frown "(" HAS to be followed by a smile ")" If only RL would be that easy and neat.
The best example of that would be yin/yang but I'm not getting into this.
it has, DNA.
Have you watched youtube lately? grins Clearly, that system does not work anymore
Not to be rude but this is more #general_chat_arma material.
Agreed and... none taken
with that i can do stuff like this
```alive ((player nearEntities ["Man", 10]) - [player] select 0)````
Im using magazinesDetail atm to retrieve the ID for the magazines that are not fullly loaded. I then want to remove these magazines and replace them with fully loaded ones (a basic rearm script). From what i have seen on the Wiki, the removeMagazine commands, only use the classname. What is the point of having a magazine ID if you cannot refer to it when trying to remove that specific magazine. Am i missing something, or is this something everyone has to work around?
I think there is a mod that re-organizes magazines, uhm...
nah, i wanted to do it through scripting, without mods or config mods
Yes, i just thought, looking at it might help you, not using it
yeah all g, thanks anyway
oh hey, its "qs mag repack v1.0.0" made by quiksilver who is actually in here now
I bet he or she can help
ahh ok, will check it out
@tough abyss sorry, your mod.cpp doesn't specifiy a version. i then always apply v1.00
Oh, it was not criticism, more like informatism :-)
@limpid pewter seems to try something like that mod does and i thought, well, i marry you two grins
haha, yeah im just having trouble making a re-arm script
Yeh ok, so that's an example where the magID is used. But my question was; Is there a way to use that magID to remove a specific magazine from a unit's inventory?
If i drop a rifle, all matching magazines are dropped as well, maybe looking into that mechanic would help?
But only those in the visible inventory (not in my vest, if i look at my carrier rig) are dropped, i think,. so the game must make see some difference
yeah maybe. As usual with arma, doesn't seem to be an easy option haha, will take a while of just testing different things i think
If you need a guineapig, just holler
but... no brainporbing!
nor probing
Yup, QS is oaky with BP ;oP
a guineapig for testing missions?
Well not to be offensive to differently specied, but guinea pigs would be useless for this application 😄
uhm, no opposing thumbs?
Sure, i suppose it would be interesting to use setAnimSpeedCoef on a guinea pig in arma tho haha
Oh wait, i got it now... guinea pigs are smarter than the arma3 AI, so they would just run off and play chess instead
Gladly
Any idea why the action doesn't work? ```SQF
{
_x addEventHandler ["Killed", {
params ["_unit"];
{
_action = [
name _unit,
"Take " + getText (configFile >> "CfgWeapons" >> _x >> "displayName"),
"",
{player action ["TakeWeapon", _unit, _x]}, // Issue here, picking up weapon doesn't work
{!alive _unit}
] call ace_interact_menu_fnc_createAction;
[_unit, 0, ["ACE_MainActions"], _action] call ace_interact_menu_fnc_addActionToObject;
} forEach weapons _unit;
}];
} forEach allUnits + allDead;
I'm assuming this happens because the weapons no longer belong to the unit after it dies? But are WeaponHolderSimulated or whatever?
Hi all. What differences between draw3D and OnEachFrame?
@jade abyss - ah, ok.
draw3D is executed after all Calcs
Thanks
So if you want to show stuff -> draw3D
So I need some fuckery to work around that limitation.
- @tough abyss iirc, the Dead Unit drops the weapon
Yeah, it becomes a WeaponHolderSimulated .
(at least the EH was triggered for it)
Yep. Try to find that with nearestObjects or so. I think Sa-Matra had the same fkery
Something like this? ```SQF
player action ["TakeWeapon", (nearestObject [player, "WeaponHolderSimulated"]), typeOf _x]
Test it out. It's too long ago that i played around with that stuff ¯_(ツ)_/¯
Nope, doesn't work 😕
add a *put EH, then check it there
There might something more to this than that... a statement of {hint "test"} doesn't even work.
No clue what you are talking about
(btw: it could take a few frames, until the WeaponHolder can be found)
{
_x addEventHandler ["Killed", {
params ["_unit"];
{
_action = [
name _unit,
"Take " + getText (configFile >> "CfgWeapons" >> _x >> "displayName"),
"",
{hint "test"}, // Statement
{!alive _unit}
] call ace_interact_menu_fnc_createAction;
[_unit, 0, ["ACE_MainActions"], _action] call ace_interact_menu_fnc_addActionToObject;
} forEach weapons _unit;
}];
} forEach allUnits + allDead;
Statement must be True/False, or?
nvm, just reading ace page
Looking back at it, I probably should've asked this on the ACE Slack, it's their function after all.
rip
Fuck did you do to get banned?
Just being himself? 😂
idiots (one type... -.- )
...
There's no selection.
It's just how Slack works 😂
Try again? Check spam?
Got another e-mail?
Hi. Can I create a headless client using a script? not changing the mission.
Thanks, but I'm using mod (config)?
You may be able to make a mod for 3den to automatically place a hc, but not sure that's what anyone wants.
Considering it needs to be slotted before the mission scripts are even loaded, I don't think you could
@tough abyss Checked the logs, you were banned for "slackin' off" /jk
(that said, I know it's possible to createUnit a curator object via script)
It is probably easier to use the old fashioned way
short question, why is
missionNamespace setVariable ["laserdesignator", [[0, 15], "Equipment", "CfgWeapons"]];
working fine, but
missionNamespace setVariable ["Binocular", [[0, 15], "Equipment", "CfgWeapons"]];"
is causing the error
9:25:56 Error Reserved variable in expression```
I know "Binocular" is also a command, but its passed as a string here, why does it still cause "Reserved variable" error?
Because Binocular is a command.
missionNamespace setVariable ["Binocular", 123]; is equal to Binocular = 123 which doesn't make sense as Binocular is a command.
waitUntil {
if ({alive _x} count units WareHouseGuys_1 ==0 AND {alive _x} count units WareHouseGuys_2 ==0 AND {alive _x} count units WareHouseGuys_3 ==0 AND alive truckhunter_1) exitWith {
sleep 1;
Track17NoLoop = addMusicEventHandler ["MusicStop", {playMusic "Track17";}];playMusic "Track17";
true};
};
};```
This one did not worked in MP, the sever hoster did hear the music but not the client
waitUntil {
if (trucktodeka distance placa <= 30 ) exitWith {
Track18Loop = addMusicEventHandler ["MusicStop", {playMusic "Track08";}];playMusic "Track08";
true};
};
};```
but this one worked
what it could be wrong with the first one?
is there a key diference to this?
this is to check if those groups are dead, and the last one to check if a offroad is alive
@tough abyss when i do such if statements i like to group things by formatting them differently
if (
({alive _x} count units WareHouseGuys_1 == 0)
AND
({alive _x} count units WareHouseGuys_2 == 0)
AND
({alive _x} count units WareHouseGuys_3 == 0)
AND
alive truckhunter_1
) exitWith {
};
makes them easier to read imo
thats unoptimized though?
if (
({alive _x} count units WareHouseGuys_1 == 0) &&
({alive _x} count units WareHouseGuys_2 == 0) &&
({alive _x} count units WareHouseGuys_3 == 0) &&
alive truckhunter_1
) exitWith {
};
because if the condition fails it will continue the line
yeah that comes after that but i was just formatting it differently ^^
actually we tested that cloud on the ACE3 slack
can't remember the results, but for simple checks it's better to not use lazy eval, but I just don't care and use it everywhere 😄
paging @still forum since he did the tests
right but speaking of longer and more heavy code
hm? lazy eval?
a CODE count ARRAY loop can always be considered heavy.
so always lazy eval on that
lol
thefuck quik
things like lazy evaling boolean variables doesn't make sense and I think is slightly lower perf
== is case insensitive, isEqualTo isn't and support more stuff
just use whatever you need
so if you run any actual code in the if statement make lazy eval. if you only retrieve variables then don't
@tough abyss you don't ever see anything
So yeah. The code posted above is terrible and should lazy eval
but what about music?
yes and the other one worked
waitUntil {
if (trucktodeka distance placa <= 30 ) exitWith {
Track18Loop = addMusicEventHandler ["MusicStop", {playMusic "Track08";}];playMusic "Track08";
true};
};
};```
@tough abyss use your eyes.. Gosh
wat
I still don't get the "people won't steal my shit"$
that's what licenses are for
^
i think most times the worst part is jsut not crediting the author, so much could be avoided and most times thats the only thing the author wants
Obfuscation and Encryption can only hold back people that are not willing enough to get something
(Atleast the encryption BI uses)
they use encryption?
EBO
it's probably because they're legally forced to do it
making mods and other stuff does too
hello guys
Do you know if it is possible to use hoist with anything other than a helicopter
sorry for my english i'm french
You're forgiven for the English, but not for being French.
Rest in White Flags
I am doing a crane, and I will love this feature
Hi,
what is the safe approach to wait till player object is present both locally and on the server?
Looks like waitUntil {!isNull player}; on client still gives flase on server for {owner _x == _id;}count allPlayers != 1.
What i'm trying to achieve - headless clients register on server as task workers. Somehow waitUntil {!isNull player}; is still not enough for them
I will have to make a attachto
you can use attachTo with ropes
but you cannot replace the rope model
@south pasture you preferably don't
@lone glade ?
where is that waitUntil?
it's in the beginning of initPlayerLocal.sqf
Does initPlayerLocal even work for hc?
Why not use initPlayerServer then?
but player reports nil there, same as initPlayer
null or nil?
either of the two, I know it's not defined
But then the waitUntil will always fail.
suspending an init script should never be done
actually I wonder why BIS didn't add safeties to avoid that
actually everything is working on HC. wait passes, request to server to register is sent, but server cant correlate clientOwner from HC with any owner of known players
@little eagle initPlayerLocal works for HC
Hard coded, QS.
B afaik
That's only one key though. I thought it's one for raise and lower or smth like that.
The dialog for the heli can definitely not be reused for a crane.
If you were to have 5k cars on your map, how would you treat the enabling / disabling of simulation (which is necessary for that amount)?
Would you have a process for each player that enables / disables the simulation on the cars that are within a 1km radius or so? Other ideas?
that applies to a whole mission though
I'd like to enable it in a module, for module vehicles only
Honestly at 5k vehicles you might aswell be doing it mission wide plus its engine based.
5K cars would crash your game
i.e Arma will be struggling around 8k objects due to network traffic etc
10 000 inventory items destroy your framerate (about 20fps with frequent freezes)
5K cars is what EXILE does.
that's why i am saying that they need to have simulation disabled
aren't they disabled anyway, after a certain distance?
everything is conceivable, including switching from local to global objects
Or was it "just" PhysX?
I don't know, it's a good question
Are they actually to be used? If not -> simple object.
well not necessarily used, but simple object would not react for instance to collisions
or a bomb
Collision = Does react, just no dmg
yeah that's what i meant
k
ok anyhow, any ideas welcome 😃
otherwise i'll just proceed as planned, i.e. 1 process / player marking vehicles
and 1 process on server enabling / disabling them
What are you trying to achieve in the end and whats the current Situation?
I didn't want to bother you 😃 but here it is
*edited
I am just considering adding civilian vehicles as part of a terrain. I just think this could add extra-realism. So I would allow to change the behaviour of these vehicles depending on settings and init.sqf configuration, something like 0 = no vehicles, 1 = non enterable vehicles, 2 = enterable vehicles
Default would be 1
adding civilian vehicles as part of a terrain <- ?
yes
What do you mean by that?
We are building a 25x25km terrain
If you add them via TerrainBuilder -> Nope, can't be added to be used by players
and on top of standard & custom objects (for instance we have a fully working cableway)
I know, but I can simply replace vehicles on postInit
use wreck objects
Meh
Again, CONSIDERING. 😃
Don't do that. Let the MissionDesigners handle that
We have precedents, for instance OpenChernarus replaces all houses in a map on postInit, and we are talking more than 5k (which BTW would just be some upper limit of sorts, i don't expect that many vehicles).
Ok, I respect that opinion
so much so, that again I'm just considering doing this as an option.
aye, in the end, you decide what you do. But i would be annoyed by it^^
To a part of me, it does only seem reasonable that there would be cars in a 25x25 map. Otherwise what is that, a gigantic holocaust where we put everything including garden chairs but then... no cars? did they all flee?
There is almost no furniture on Altis, soooo....
I get it, that is in the other part of me 😄
+Thats why it's called "Sandbox" 😉
eheh
sure, I understand your point, I really do
so while I evaluate this idea, I'm also considering technical implications (hence my original question)
If a Missionmaker want's cars on it -> He will probably end up setting them himself on "strategic positions" for example
sure
IF so, i wouldn't even hassle with placing them on the map itself
Note positions, put them in an array, spawn em in the init
well
The only thing i would place down, would be Wrecks.
placing them in the map allows us to have exact positions and if we change them in TB then it will reflect without further changes.
ok
Like "scenes" -> Hey, there are 2 wrecks who had an accident, maybe adding a corpse to it too.
¯_(ツ)_/¯
eheh
"Details" <--- !!!
Wait. Was there a command to report the line count of a multiline control?
private _lineCount = {_x isEqualTo ASCII_NEWLINE} count toArray ctrlText _ctrlValue;
Guess I'll stick with that ^ then :/
Or that
^
admit it, you just wanted to pose again Commy 😛
eheheh
Nah, but I haven't tested it yet and vaguely remembered there being something for this.
@tough abyss https://github.com/auQuiksilver/Apex-Framework/blob/master/Apex_framework_beta_101.terrain/code/functions/fn_clientCore.sqf
What the F dude?
Your reputation just dropped by 100x
oh jesus
JESUS
that file would fucking crash atom, I have RPT logs shorter than this
why the everloving fuck are you using comment
I have so many questions
Like:
_QS_productVersion = productVersion;
_QS_resolution = getResolution;
_missionStart = missionStart;
_QS_worldName = worldName;
_QS_worldSize = worldSize;```
Why?!
Because someone said retrieving stuff from local variables is faster than calling nular functions.
which is true
but dude
how much? 0.000001?
That's a perfect example of some idiot taking performance advice tooo far
"too far"? have you seen the code?
no. More like 0.002ms
so many if else
and so many if if if if if instead of putting it in one
if(bla && {bla2}) etc
Yeah.. Just an idiot paying attention to the tiny optimizations that you should do when you are done with your script. And completly ignoring the big picture
It's like..
<very unreadable but extremly optimized code>
Sleep 5;
WTF dude?
XD
Lul
@tough abyss quality work isEqualTo quality meme
i used isEqualTo pay careful attention
wat. 6k lines? please tell me it's generated code.
if not... props for being able to not go insane while coding
That's so much better. If you wanna train your neck
Go and watch tennis from the first row
Mother of God
@tough abyss that is horrible stuff...
At least split the file up and use the preprocessor
@jaunty zephyr more levels are actually more efficient then less but chained ones in sqf
I know. I'm not disputing efficiency here.
In regards of "one large vs multiple small ones"
That is complete and utter Bullshit
But it is indeed quite optimized
But sacrificed too much for nothing
^ very much that.
I wrote a function that creates markers. In another script I'm trying to call it 3 times in a row, but only one of the markers gets made. Anyone have any ideas where I should start troubleshooting that?
Unique name
Organization @tough abyss
mantainability. way easier to find your way around and to avoid code duplication if it's in small chunks.
@queen cargo @peak plover You were right, misplaced "" 😳 Thank you
Lemme repeat: you did wrong and let loose of a hell lot of tools
Your execution is horrible
Not the one "thread" thingy but rather how you approached
@ivory nova no problem
How long is that file again?
0-EOF
You could have used multiple ways to get it split up (variables containing parts of the code, #include,...) or even could have created a proper system and iterate over that
Instead you just put everything into a single file without any real benefit
Form
Functionality wise it would change nothing
But it would be readable by any human being
Coding is not only getting the problem solved but getting it maintainable solved
You may succeeded in getting the job done but failed in all other requirements for coding miserably
in my experience, "others" often includes a very sad future self
i for one tend to forget what i did when and where
Does not matters
You will look in a few years onto this monstrosity and ask yourself what you did there
Code styling matters just like structure does and comments do
I've seen code and thought "who was the idiot" only to discover it was me
But you are the dev
The player is just your osi layer 8 problem
right, but we're in #arma3_scripting here, so expect to be grilled for bad coding practices ;)
It's about speed and nanosecond performqnce
@tough abyss = White Rose
of course it is Nigel, if it's not 0.0000000001 nanoseconds then it's garbage
There is benefit to the approach... Bit it could still have been performed better and properly
With preprocessor overriding the default commands for example
But that would not change when you would split the file up
Now you created something nobody ever will bother to read
See that's good practice, less scripts running = less nanoseconds used
Where would that happen?
You could even remove the "overhead" that gets caused when using call
You could have made 1 script handler that runs and split every function up 'tho and still only have 1 script running at any timw
Simply by utilizing the only thing nobody really complains about
Preprocessor
That @peak plover
False assumption of yours is the problem then
Call will not run unscheduled
No
Only way to get non scheduled is from within non scheduled environment
Spawn something and then call { sleep 1}
Isnil causes unscheduled
Call is not different from if or any other command taking code as input parameter
And doing stuff with it
Otherwise if would also be automatically unscheduled
TL;DR for that script @tough abyss
Yeh, too unorganized, might be bad for you too because going back to add or fix things will take longer than alternatives
I try to write in a way that I would understand it yesterday and tomorrow
I just hope it doesn't catch on just because a con artist told people that it's the magic fix for fps.
@Moldisocks#2334 thanks for the help mate but i have managed to get compositions to spawn with my ai by using
private _cargo = [_position,0, call (compile (preprocessFileLineNumbers "objects\base1.sqf"))] call BIS_fnc_ObjectsMapper;
@little eagle whitespaces? Shhh... It's top secret fps trick
can someone explain me when should be using bis_addstackedeventhandler with the param onEachFrame?
When you wanna do sth every frame
and is it better than a for loop / while true?
if I want to run something that last forever
It's definitely better for some things
like?
the wiki says that only one onEachFrame loop can exist at any time, does that mean that I can't used it anywhere else beside that script?
Ohh, using, bis fnc add stack mean u can use more
Normal oneachframe it's only 1
If you want to limit the player to a specific area that wud come in handy
While loop that needs to run more than once per frame
@little eagle do you remember my problem I had with xeh init evh and so on? It seems like xeh get's recompiled at the same time the editor is initializing all placed objects. Therefore it's not even firing. Now I'm using onMissionPreviewEnd provided by 3den but strangely my functions are nil when this evh fires so I have to wait until they are not nil any more. Any ideas why this is happening? I assume it's because of the way cba compiles (and recompiles) functions.
https://github.com/chris579/grad_trench/blob/editor-place-fix/addons/functions/Cfg3DEN.hpp#L4
It doesn't matter as much as I know, but it really depends on what you are doing. If you post code maybe I can help you dwcide
Im trying to get a array of units in a side but
Units west is not valid, how is the right way to do it?
private _allWestUnits = [];
private _allWestGroups = allGroups select {side _x isEqualTo west};
{
_allWestUnits append units _x;
} forEach _allWestGroups;
_allWestUnits
Alternative:
private _allWestUnits = (allUnits + allDeadMen) select {side group _x isEqualTo west};
_allWestUnits
thanks
yw
addAction with all the default parameters:
Midnight, if that was you, you are a hero.
(player nearEntities ["Man", 20])
this does noe return array in order by distance, what are the requirements to be the first in the array? also, is the player allways is the first in the array?
@tough abyss Your code doesn't say anything about FPS if it's scheduled. Your code can be a crapfest that takes hours for a single run and still run at 120fps because.. scheduled. So good fps actually say nothing at all about the performance of your scheduled scripts.
So if you say using monster scripts gives good fps.. So does any number of scheduled scripts... Even if you had thousands of scheduled scripts running it wouldn't change anything. As they run for 3ms and that's it
@astral tendon I don't think nearEntities has guaranteed ordering by distance. They should be sorted the way they appear in the internal entities list.
nearestObjects is sorted.
#350
Yep, #350 (aka: Unpayable)
This is the one place on earth to not ask this question.
You'll only get sarcastic answers.
That's "life" ¯_(ツ)_/¯
That mean any array comes in randon order by default?
"This command does not guarantee that the returned array is ordered" -> Every array is always random ordered.
No.
"This car is red" -> All cars are red. NO.
Like, names influence in the order?
No
No, the internal entity list does.
what about: #community_wiki
dedmen had to go around and delete a bunch of shit they posted last time
Leaving it so BI staff can work on countermeasures
erf, can't remove the page :/
don't.
yeah, figured as much
Right now you can post anything without verifiying your email or even going through a captcha.. Although the wiki software has captcha support builtin.. but BI just didn't enable it cuz... BI
I wonder if they fixed the forums certs
What's the point of making a bot spam "google email google"?
that's what i'm wondering....
They spam phone numbers for tech support scam stuff I think
I don't see any tho :/
^
wut.. then you're blind
Especially if you can't even find any shady links or telephone numbers.
<number> GOOGLE CUSTOMER SERVICE NUMBER
Google®© <number>®
r18662017657
^ that is a phone number?
it looks like someone passing out on numpad 😄
This is what the world will look like when the machines take over.
I never bought something that I've seen in advertisement.
the addMusicEventHandler, if i add another addMusicEventHandler i will have 2 running or only one can run?
thanks
silly question, is it better using params or private? When should I use params instead of private?
👍
params and private are totally different things.
For when you should use private... Always. But never use private ARRAY.
Should I repeat it again?
3 is the magic number.
Instead of apples and oranges, I suggest bananas and aubergines.
If someone leaves a wishlist on a feedback "tracker", and that someone is named "Shekelberg". How likely is it for them to be a troll?
No ((())), but I'm not even sure if that software allows for them.
Cute.
F5
Heh, this pushes me at the top of the client list.
Just gonna put it out there... http://knowyourmeme.com/memes/triple-parentheses-echo
Triple Parentheses, also known as (((Echo))), is a symbol used by anti-Semitic members of the alt-right to identify certain individuals as Jewish by surrounding their names with three parentheses on each side. The symbol became a subject of online discussions and media scrutiny in June 2016 after Google removed a browser extension that automatically highlights Jewish surnames in the style.
~Echos are the best thing to happen to internet culture in a long time tbh
I mean it's probably less about taking offence and more about how it's used
Is there an issue with attachTo on simple objects? AttachedTo returns what it should, but it doesn't move when I move the simple object
simpleObjects are not simulated
attachTo'd objects are moved along when the object is simulated
isn't Network update of SO also disabled?
Hmm okay thank you. I'll set position every frame then
MP or SP Adan?
both, MP but locality updates will be... special 😄
my main position movements for quick updates already used the setPosLocal workaround tricky magick stuff
the object that i'm attaching is local btw
Then you shouldn't use updating per Frame. When i did that with 2017mod it looked well on the OwnerPC, but all of the other clients had lagging objects ( ~1 1/2 years ago)
You better test that pretty early of Dev in MP (DediMachine) with a friend first.
i know
but this thing is local so its fine
params [["_object", objNull], ["_position", [0, 0, 0]], ["_commitTime", 1]];
if (isMultiplayer) then {
private _localMover = _object getVariable ["localMover", objNull];
// -- Create local object, that we attach to, so we can do local positioning
if (isNull _localMover) then {
_localMover = __LOCALMOVERTYPE createVehicleLocal _position;
_localMover setObjectTexture [0, "#(rgb,8,8,3)color(1,1,0,1)"];
_object setVariable ["localMover", _localMover];
_localMover setVariable ["localMoving", _object];
//private _relativePos = [0, 0, 0];
_object attachTo [_localMover];
// -- Add to an array that we loop through with commit times
private _localMoveArray = GVAR(namespace) getVariable ["localMovedObjects", []];
_localMoveArray pushBackUnique _object;
GVAR(namespace) setVariable ["localMovedObjects", _localMoveArray];
};
// -- Set the new time at which we want to make the position change global
_object setVariable ["localMoveCommitAt", diag_tickTime + _commitTime];
_localMover setPosWorld _position;
} else {
_object setPosWorld _position;
// -- (Because setPosASL and getPosASL dont'use the same coordinate system) (No i'm not joking. Arma ladies, gentlemen and attack helicopters)
};
that's what i use outside of that
but in this case i'm attaching a local object to the thing i'm changing position of, so it's fine
Why don't you just exchange the SO with a "normal" one on attaching, then replacing it when dropped?
Would cause less brain and scriptfuckery, or? ¯_(ツ)_/¯
because my library is build on Terrain builder template files and the actual model paths for everything
it parses the .tml files, no create vehicle for any of the object placement
I am afraid to ask what you wanna do oO
i posted videos in bludclots channel 😉
wich of them? I mostly skip em^^
Hey guys, so it appears that owner returns 0 for everyone on client side
Any other way to do this?
Hey guys is there a script that would make it so " If player is wearing vest run this script "? i can't find anything like it
why do you need to use owner?
owner of what? owner player= @rotund cypress
That is only local though, thats the thing
Which always returns 0
owner returns 0 because the client doesn't know who owns some other thing I'd guess
try netID one part of it should be owner
^ only the server knows which object belongs to who
which remoteExec go through so you don't need to know who owns what
I was using remoteExecutedOwner
then a function to get the player of that owner id
and again, why?
Because I want to get the player who remoteExecuted ^^
Sounds weird. Just pass the player object as additional argument.
Yeah could do obviously, but I could just use remoteExecutedOwner
Then no need for unnecessary arguments
No, you obviously can't.
People ¯_(ツ)_/¯
But you won't get the player that way @rotund cypress
A client can have more than one local object
{
if (owner _x isEqualTo _ownerID) exitWith {_unit = _x};
true
} count ALLPLAYERSNOHC;```
This is what I used to get a player from a remoteexecution
but obviously it didnt owrk
But I guess netID would work fine?
Getting the owner from that
let me rephrase myself is it possible to make it that a script will ONLY work if a person is wearing a certain vest? sorry if its not possible but i cant find anything about it.
This is just trolling at this point.
@willow trail yes.
@willow trail https://community.bistudio.com/wiki/vest
Wait, is the owner id not the same as the first numbers before : in netid ? @little eagle
if vest unit == "vest name" then stuff
Just pass the player object as additional argument.
No need if I can get the owner id through that 😉
Just pass the player object as additional argument.
This is the best advice I can give you. If you want to hack around for no reason or benefit, ok.
because you are trying to find complicated workarounds instead of just going the easy way
^
I beg to differ, never having to pass an object of the executor again, which in short term means less code
a serialized object is just one integer. So you don't really create any network overhead
@rotund cypress You are trying to write code as a workaround. Why does not needing that code mean more code?
Why ask a question if you dismiss the obvious answer?
What was wrong with the code? @lone glade
Obviously I know that I could just pass in the object, however, if I can get it in this way: there is maybe no need to pass in an object @little eagle
passing an object is easier and more efficient though...
You're making things worse. You got a bad idea.
Also
Using the workaround means there is no need for passing an object.
Passing an object means there is no need for your workaround.
hey @still forum I've currently got
if vest player = "V_HarnessOGL_brn" then;
followed by my script but it doesn't work, I apologize in advance but i'm rather new to scripting in arma 3
Is this what you want instead? @lone glade allPlayers select {owner _x isEqualTo _ownerID} select 1; cause iirc that is slower way
@willow trail https://community.bistudio.com/wiki/if
yeah i cant make anything out of what it says on that page
Well.. I guess then you gotta take a reading comprehension course @willow trail
or even using comment seemingly randomly
Wait are you talking about my script snippet? @lone glade
yeah sorry my english isn't as good as yours that really helps
no simzor, i'm talking to quik
He's using it because he's an edgy contrarian.
@willow trail There is an example.
@tough abyss why do you put so much stuff like worldSize and stuff into a private variable?
Why do you do that?
that func is barely readable, and a mess
less function calls. So. You want more performance?
Every if statement is a function call btw.
So there are thousands of function calls.
Like you make completly idiotic decisions to improve performance. And then you use the most idiotic ways to waste performance
Like you are a completly brainless piece of shit that doesn't understand the most basic things.
but it's unmaintainable
It's like when you want to go through a door. You disassemble the doorframe. Take the door out. Go through. And reassemble the doorframe.
Because. uh.. Dunno. "I'm dumb I guess?"
Maintainability is not form. But that isn't the only problem. Far from it.
20
the worst part is that you know what you're doing, but for the wrong reasons
If you want performance then all the local variables make good sense.
But you apparently don't want performance because you don't care a couple lines later.
I treat it as an elaborate trolling attempt that worked perfectly.
You spend days writing a bunch of shit because.. No reason.
Sadly some people will take it seriously and waste hours on the ideas for nothing.
I'm more about the fact that someone already tried to send a link of your crap to a beginner trying to learn SQF as a example of good code.
You are dooming every beginner that looks at your code to learn stuff
Maintainability is not form. But that isn't the only problem. Far from it.
@tough abyss btw https://github.com/auQuiksilver/Apex-Framework/blob/master/Apex_framework_beta_101.terrain/code/functions/fn_clientCore.sqf#L108
retrieving variables is slower than using constants.
But the preprocessor is evil, Dedmen.
compiler*
pff
also, quick tip, you don't need to use saveProfileNamespace
the file is written whenever the namespace changes
Or _QS_uiTime = diag_tickTime; Storing the time.. That's just dumb. The first time you use the time you stored it's already a second later. At the end of your function several minutes could've passed and you still use the time from minutes ago.
1st
also, quick tip, you don't need to use saveProfileNamespace
I've been saying that one for years, but that's another thing that won't go into peoples heads.
They somehow think it's needed.
people ¯_(ツ)_/¯
https://github.com/auQuiksilver/Apex-Framework/blob/master/Apex_framework_beta_101.terrain/code/functions/fn_clientCore.sqf#L1221-L1222
Why don't you store "false" and that array in local variables?
The whole thing is just badly written...
exactly
One up.
you have so many fixed values, why not use macros?
lol
looking up a local variable is faster than calling player
0.000000001ms ?
but false is just as slow as player so if you want perf you also need to save things like true/false
How many scopes you need to make it worse, dedmen?
I guess about 1-2
Because there are like 20 in some places.
Which
so many scopes, do errors even print properly?
Because that idiot wants to have nested if statements everywhere.. and each if statement is a scope
alganthe, they never do, so who cares.
good point
using local variables is probably like 10x slower than calling the commands
Somehow functions calls are bad if they use call, but perfectly fine if they use then.
That might actually be faster than call
Anyone remembers the timeDiff of
if()then{
if()then
vs
if(bla && {bla2})then```
?
lets say... with 6 Sub If's?
On average, the nested if is better under the condition that the first statement is likely to be false.
what i recall is that the {} version was faster
Depends on the probability of the statements.
*me slaps @little eagle with a large trout*
Can't you like try yourself?
if(true)then{if(true)then{};}; 0.007ms
if(true && {true})then {}; 0.0059ms
if(true)then{if(true)then{if(true)then{if(true)then{if(true)then{};};};};}; 0.01ms
if(true && {true} && {true} && {true} && {true})then {}; 0.0092ms
if(false)then{if(false)then{if(false)then{if(false)then{if(false)then{};};};};}; 0.0042ms
if(false&& {false} && {false} && {false} && {false})then {}; 0.0061ms
No can't.
Dedmen, you did the lazy eval wrong.
wut?
ikr ¯_(ツ)_/¯
nah
hm
https://community.bistudio.com/wiki/Code_Optimisation
Now the engine will only continue reading the condition after the group has some knowledge about the object. Alternatively you can use lazy evaluation syntax. If normal evaluation syntax is (bool1 .. bool2 .. bool3 .. ...), lazy evaluation syntax is (bool1 .. {bool2} .. {bool3} .. ...). Now let's look at the above example using lazy evaluation:
if (_group knowsAbout _vehicle object > 0 && {alive _object} && {canMove _object} && {count magazines _object > 0}) then {
//custom code
};```
Wrong info in there?
@jade abyss The code inside the {} will only be executed if the previous one is true.
Wrong info on Code Optimisation page?! You don't say.
¯_(ツ)_/¯
Using what you posted still calls the && operators needlessly
Dedmen (∩`-´)⊃━☆゚.*・。゚ - Today at 7:18 PM
@..aDscha The code inside the {} will only be executed if the previous one is true.```
Yes, i know?! oO
Remember that && itself is a command in this language.
if(false&&{false&&{false&&{false&&{false}}}})then {}; 0.0047ms
if(true&&{true&&{true&&{true&&{true}}}})then {}; 0.0086ms
And by encapsulating it in the code block, you can skip it too.
a useless mess without any reason for being like that
You are changing your nickname too fast. Try again later.
lol
I concede.
@tough abyss
muhahaha, i am the commy2, i love macros
😱
😱 imposer!
imposter*
Okay, enough fun. ttyl guys o7
by commy2 huehuehue
?
I have array of classes ["B_GEN_Soldier_F", "TapeSign_F", "OfficeTable_01_new_F"] and need to determine if class is "unit" (e.g. CaMan)
_units = _classnames select {_x isKindOf "CAManBase"};
: /
ahh, I missed "alternative syntax", thx tho 😃
Btw to the storing nular commands in local variables being faster.
Actually storing into the variable is slow AF.
So it only pays off if you reuse it about a dozen times atleast.
private _populateList = {
params [
["_input","",[""]],
["_params",[],[[]]]
];
private _list = (_params select 0) displayCtrl 40004;
private _cfg = missionConfigFile >> "Crafting" >> _input;
private _icon = "";
(_display displayCtrl 40006) ctrlEnable false;
lbClear _list;
for "_i" from 0 to count (_cfg) - 1 do {
private _curCfg = _cfg select _i;
private _name = getText (_curCfg >> "name");
private _id = getText (_curCfg >> "craftedID");
_list lbAdd _name;
if !(_input isEqualTo "Utilitari") then {
private _info = [_id] call life_fnc_fetchCfgDetails;
_icon = _info select 2;
} else {
_icon = ITEM_ICON(configName(_curCfg));
};
if !(_icon isEqualTo "") then {
_list lbSetPicture [(lbSize _list) - 1, _icon];
};
};
};
switch (_mode) do {
case "onLoad": {
(_display displayCtrl 40001) ctrlAddEventHandler ["ButtonClick", { ["Armeria",_this] spawn _populateList; }];
(_display displayCtrl 40002) ctrlAddEventHandler ["ButtonClick", { ["Abbigliamento",_this] spawn _populateList; }];
(_display displayCtrl 40003) ctrlAddEventHandler ["ButtonClick", { ["Utilitari",_this] spawn _populateList; }];
/*(_display displayCtrl 40004) ctrlAddEventHandler ["LBSelChanged", { [_this] call _selectItem; }];
(_display displayCtrl 40006) ctrlAddEventHandler ["ButtonClick", { [] call _craftAction; }];*/
["Armeria"] spawn _populateList;
};
default {};
};```
does someone know why the actual fuck do I get _list undefined?
if I change the spawn in call, everything works
the display control doesn't exist?
(_display displayCtrl 40001) ctrlAddEventHandler ["ButtonClick", { ["Armeria",_this] call _populateList; }]; ```
control ID being nil
you can use sqf highlighting btw.
or typo
well ofc
you can't store displays and controls in vars in scheduled without disableSerialization
Should show errors tho shouldn't it?
yes
if using spawn yes
it should print it in the RPT at least
Why don't you ask about the error telling you you can't pass displays then?
No you don't
(_display displayCtrl 40001) ctrlAddEventHandler ["ButtonClick", { ["Armeria",_this] call _populateList; }];
The script starts at { and ends at }
I don't see any disableSerialization in that script
ohhh
and your _polulateLists script also doesn't have disableSerialization
i typed disableSerialization at the beggining of my file
isn't that going to cover all?
disableSerialization covers your script.
gonna test it right now, thank you all
The eventhandler script is a new script
and your spawned script is another new script
👍
If i host a mission to play with my friends, hosted on my comp, is there a way to spawn in certain vehicles using the server Exec thing?
Yes.
dam dam dam, another one for the list *sing*
does anyone know what this could mean (in a log):
Setting invalid pitch -5759945593732464640.0000 for B Alpha 3-4:42 REMOTE
and also
22:34:44 Server: Object 49:327 not found (message Type_114)
@surreal flameTheUnique#9242 _veh = "VehicleClassName" createVehicle position player; The class names can be found on the wiki. Ex: https://community.bistudio.com/wiki/Arma_3_CfgVehicles_WEST
I'm having an issue calling a function I created in cfgFunctions.hpp. All the function does is attempt to diag_log but nothing happens when I call it. My cfgFunctions is sqf class CfgFunctions { class MANA { class System { file="functions\System"; class playerDisconnect{}; }; }; };
I completely failed at my attempt to highlight that, but if anyone knows what I'm missing in this would be a big help
Open RPT and check if it says file not found or something like that.
Mission or addon?
it's server side code, rpt doesn't seem to show an error for it. I have a diag_log in the file that calls it which is running and right before the log it says this "Client: Remote object 3:0 not found" not sure if related
Tf is server side code? Is this an addon only running on the server?
Yes
Then the function will not be defined on the client period.
Oh. I'm dumb. I just need a config.cpp
config.cpp with CfgPatches and CfgFunctions.
yeah. Thanks for the help
if (true) exitWith {
if (alive player) then{
Hint "ready";
};
true};
}; ```
Just chceking, in case that if (alive player) is not true the code still have exited?
Yes.
thanks
One thing i noticed, seens like for a split second in MP the player is set alive before even spawns adding a Sleep 1 to the script seens to fix it, but that second can be diferent depending on the PC running (like low perfomace) or even lag? or does the initPlayerLocal starts at the same time when the spawn screen apears?
initPlayerLocal is executed when your player becomes not null.
so its better ask isNull intead of Alive?
Shouldn't make a difference. alive reports false for null. I guess !isNull is clearer though.
mine dispensers don´t go off with setDamage 1 ? -_-
Need a dummy unit.
_unit addOwnedMine _dispenser;
_unit action ["TouchOff", _unit];
ah! Thanks @little eagle
Maybe try with a createUnit'd "Logic".
private _logic = createGroup sideLogic createUnit ["Logic", [0,0,0], [], 0, "NONE"];
_logic addOwnedMine _dispenser;
_logic action ["TouchOff", _logic];
deleteVehicle _logic;
Or maybe it needs an actual unit. Idk.
yea either that or incorporate it into the mission or task with a unit that won´t be deleted
yea that
after a quick though maybe this one would go really nice with my hack the terminal task in which you have to open the terminal and use the laptop within a certain ammount of time to complete the " hack", the only consequence so far is task failed but maybe adding a couple of dispenser that will go off if you fail it... hm.. tension that´s what i need
Why not use the satchel to blow up the player?
Spawn a bunch of stachels closing in on the player.
if done well it can completly imobilize a whole squad
0 spawn {
for "_i" from 0 to 30 do {
sleep random 2;
private _pos = player getPos [10 + random 50, random 360];
_pos = _pos vectorAdd [0,0,30];
private _bomb = "SatchelCharge_Remote_Ammo_Scripted" createVehicle ASLToAGL _pos;
_bomb setDamage 1;
};
};
^ like this.
nah i want something balaced.. it can be hard but there is a chance .. with satchels you just blow up
plus mine dispensers are new
New and shiny.
Which?
Still mad they didn't make one for cargo.
i think they did
No.
oh im confusing with the getVehicleCargo
which is also nice
you can do fullcrew and even getCargoIndex afterwards if you need that info
i think fullcrew already returns the index
yea it does
I mean the item/weapon/mag/backpack cargo. And there is no setter, and to remove you have to clear.
give me an example
addBackpackCargo
getBackpackCargo
clearBackpackCargo
are we talking the same thing ?
Try to remove a single weapon from cargo.
Try to add one with specified attachments, mags and ammo count.
Oh.
Look what I found.
so addWeaopnItem is not working ?
private _dispenser = "APERSMineDispenser_Ammo_Scripted" createVehicle _position;
_dispenser setDamage 1;
_Scripted is the one that exploded when dead.
ah! you create as a vehicle and not create mine command and it works ?
Yeah, and you have to use this classname.
good find!
i will try to get around what you said to me about adding specific things to cargo to test it out
now im curious
The array [1,2,3], the command
select 4
is there a way to detect of that selection have nothing?
you can check if its nil or null
although I think null is empty, nil doesn't exist
iirc
i set that command to be ```team_2 say3D ["10MC536", 20, 1];````
that does not work
team_2 say3D "10MC536"
but this does work
oh i see, maxDistance also decrease allot the volume, i need to be kissing the unit to hear
I'm trying to have initServer.sqf from an mp mission call init.sqf located in a server side addon. Having trouble finding init.sqf what file path do I use? Even more confusing because of the pbo packaging
switch _houses do {
case 1..5: {};
case 6..8: {};
};
Is something of the above possible when using case for if a variable is between two numbers?
Good question idk
switch _houses do {
case ((_houses > 0) && (_houses < 5)): {};
case ((_houses > 5) && (_houses < 10)): {};
};
It appears the above works instead
@daring pawn
what about
switch (true) do
{
case (1 > _houses > 5) : {};
case (6 > _houses < 8): {};
};
Oh, kk
Good to know
Good question idk
I am using the below code to return an array of all cars arround a marker. The script works fine when the vehicles at the position are empty and undammaged, but as soon as they explode the below code doesn't return any vehicle ojbect.
_nearbyCars = nearestObjects [(getMarkerPos _x),["car"],4];
Does anyone know how to find the 'type' name of a vehicle wreck, is in under CfgVehicleClasses?
i was thinking that this would work to return all vehicles and their wrecks
_nearby = nearestObjects [(getMarkerPos _x),["car","wreck"],4];
@astral tendon regarding the array, use param with default value
@limpid pewter entities "Car" will return wrecks and vehicles
Evening, does the way I have the params/variables set up look peachy? Getting undefined variable error when I try to call this with [[x,y], [x,y]] call MY_fnc_here;
private ["_point1", "_point2", "_x0", "_x1", "_y0", "_y1", "_x2", "_y2", "_deltaX", "_deltaY", "_slope", "_maxX", "_minX", "_marker"];
_point1 = _this select 0;
_point2 = _this select 1;```
oh, i messed up the expected data type didn't I ...
or not, i dunno
uh it looks very wierd. you should only need to first line (params) to initialize the _point1 and _point2 variables
also depending on where that variable undefined error shows up, if might be your function thats not defined
other than that no syntax is fine
Hmmm, thanks!
have defined function in functions.hpp and included in description
but yeah, muh params giving me trouble
are you sure it's actually that line? Is your cfgFunctions accidentally calling the functions by you setting pre/postInit to 1? etc
and then diag_log is the holy grail for debugging, looking at your variables and checking which is causing the error
%LOCALAPPDATA%\Arma 3
you can go there from 3den now iirc
Latest RPT file. Copy paste the error.
Wow, that's neat
21:02:21 Error position: <RND_fnc_slopeIntercept;>
21:02:21 Error Undefined variable in expression: rnd_fnc_slopeintercept
21:02:21 File C:\Users\Christopher\Documents\Arma 3\mpmissions\Subvert.Altis\init.sqf, line 11```
RND_fnc_slopeIntercept as a whole is undefined, not a local in the function.
holy shit the .rpt files are huge, how do you find what you are looking for?
you look at the bottom
don't control + f "error" lol
^
yeah scroll to bottom
errors are logged at the end
if it gets too large i sometimes just delete all the contents and go from there
you look at the bottom
You read them from top to bottom.
No, you look at the bottom last, because it's at the bottom.
- < aghhhhhh
The first error can cause all kinds of follow up errors. Why would I want to fix the follow up if I can just fix the initial error?
My .rpt file is 88774 lines long : (
I have CfgFunctions including functions.hpp, which lists this borked function, it also lists other functions though, which seem to work, any idea why that might happen?
had checked that, but will double check
@ivory nova what is borked about it?
Check the ingame functions viewer if the function is defined. missionConfigFile.
what is borked about it?
About 88000 things.
have you reloaded your mission in the editor?
i dont remember if arma refreshes the description.ext
oh, that did it
Restart doesn't update configs afaik.
phew
thank you for the help!
yeah it's in the config viewer now, awesome
you're the best
when i edit a multiplyer mission i have to go back to editor, save then reload in each time i want to update my functions, is that what you mean?
Only config, scripts are loaded after Restart too.
TIL!
everytime i make changes to a fucntion as a file i have to do that too -_-, do you guys know a secret around this do you?
Maybe you need -filePatching for that? Idk.
i think thats just for addons
That's what I thought.
wait,so you're telling me that for the past year, i have wasted 50 hours+ reloading the mission each time i change a function?
maybe
+_+
I reloaded missions and the game so many times that I decided to just stop making errors.
thats why i normally define functions inline in init.sqf or something when making missions, then move everything to cfgFunctions wrapping up at the end
i know BIS has a function that recompiles (BIS_fnc_recompile), but afaik that only works for singleplayer
@little eagle lol!
Could also just set up the mission in a way that it works in SP and MP, so you can test in the SP editor.
yeah but i have about 20 diffrent functiosn that need to run on server for local functions to work
And? In SP, you are the server.
20? i suggest now is the time before it reaches 200
Just have to avoid isDedicated and use isServer instead.
isServer and hasinterface, right?
Yes.
i member
Discord!
Spend enough time here and commy drills things into yur head ^^
So i mean if you load into arma, then you go "edit" and make a mission, that is SP. MP is when you host a server on LAN, then edit from there. That;'s what i understood
He's just a troll, Dedmen, and doesn't actually give af about them. Just another line of attack.
Deflection.
just ignore.
@limpid pewter in 3DEN, you are server and player
@tough abyss Are you a child? People who ignore #rules and spam in like half a dozen channels deserve to get banned. Not get rewarded for breaking rules.
Also. Commy actually answered his question twice. He didn't ask how.
@cosmic kettle No matter whether you edit in SP or MP?
I just arrived. I see there is a TFR up there. What's going on right now.
Btw @cosmic kettle it's TFAR*
Cries in corner knew it
All I want is, that someone replies with "How?" instead of getting offended, or getting someone else offended in his stead.
It's a good way to measure how engaged they actually are.
@limpid pewter Having trouble with what you're saying, no matter what you do, in 3den, you are server. so everything will work as is, apart from things like playableUnits etc...
k
There always is one machine with isServer being true. In single player, there is only one machine. Therefore, your machine is the server in single player.
I'd say the fact that he spammed his message in multiple channels and then didn't reply to any of the answers he got within about a minute of him asking.. Shows how engaged he really is 😄
ok, thanks