Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CBA_fnc_taskPatrol broken #499

Closed
Maffaxxx opened this issue Sep 7, 2016 · 18 comments
Closed

CBA_fnc_taskPatrol broken #499

Maffaxxx opened this issue Sep 7, 2016 · 18 comments
Labels

Comments

@Maffaxxx
Copy link

Maffaxxx commented Sep 7, 2016

Arma 3 Version: 1.62 stable
CBA Version: 3.0.0 stable

Mods:

  • @CBA_A3 - @ACE

Description:

  • CBA_fnc_taskPatrol (both script and module) generate an error in RPT:

18:44:18 File x\cba\addons\ai\fnc_addWaypoint.sqf, line 3
18:44:18 Error in expression < "x\cba\addons\ai\fnc_addWaypoint.sqf"

params [
"_group",
"_position",
["_radiu>
18:44:18 Error position: <params [
"_group",
"_position",
["_radiu>
18:44:18 Error Params: Type Array, expected String
18:44:18 File x\cba\addons\ai\fnc_addWaypoint.sqf, line 3
18:44:18 Error in expression < "x\cba\addons\ai\fnc_addWaypoint.sqf"

Steps to reproduce:

  • module: place a module in the editor, synch it to one or more groups, check .rpt
  • init script: place a script in the init field of a unit: [this, this, 300, 7, "MOVE", "AWARE", "YELLOW", "FULL", "STAG COLUMN", "", [3,6,9]] call CBA_fnc_taskPatrol;

Where did the issue occur?

  • Editor (Singleplayer) / Editor (Multiplayer) /

RPT log file:

  • Add a link (gist or pastebin) to the client and/or server RPT file. An instruction to find your RPT files can be found here.

arma3_2016-09-07_18-05-48.zip

Note: script&module still work properly, but they spam the RPT horribly.

@commy2
Copy link
Contributor

commy2 commented Sep 7, 2016

@SilentSpike
was this already fixed in #440 ?

@commy2
Copy link
Contributor

commy2 commented Sep 7, 2016

I can't reproduce on latest master. Waiting for Silents answer. (Reminder to myself to add this to the changelog)

@commy2 commy2 self-assigned this Sep 7, 2016
@Maffaxxx
Copy link
Author

Maffaxxx commented Sep 7, 2016

try placing more units. when i tried one group only once it looked fine, but when you have several (as in trying to reproduce a civilian city) you got problems. more than 4 groups should do the trick. someone pointed out to me that maybe it is due to a lacking Z parameter in the second position of the array, the placement one (no idea what he was talking about tho).

@commy2
Copy link
Contributor

commy2 commented Sep 8, 2016

Can you upload an example mission? Preferably with anything striped away that isn't vanilla Arma?

@kymckay
Copy link
Contributor

kymckay commented Sep 8, 2016

@commy2 I can't say I ever encountered this error in all of my testing for that PR

It looks like that's an outdated function though because in the latest version the params has ["_position",[]] not just "_position"

Whoops, I actually read the rpt log wrong, that's fnc_addWaypoint not fnc_taskPatrol

@commy2
Copy link
Contributor

commy2 commented Sep 8, 2016

Yeah, even before your PR, it was:
params ["_group", ["_position",[]], ["_radius",50,[0]] ...

instead of
params ["_group", "_position", ["_radiu ...
as shown in this RPT.

@commy2
Copy link
Contributor

commy2 commented Sep 8, 2016

NVM. This is a follow up and the error happens in CBA_fnc_addWaypoint

https://github.com/CBATeam/CBA_A3/blob/master/addons/ai/fnc_addWaypoint.sqf#L35

@kymckay
Copy link
Contributor

kymckay commented Sep 8, 2016

Just mentally going through taskPatrol now and can't say I see anything wrong with what it's doing and passing into addWaypoint.

@commy2
Copy link
Contributor

commy2 commented Sep 8, 2016

Same, although I must say, that I dislike how the arguments are handled.

It's a bit to minimalistic. To a point where errors like these happen and no one understand why.

@kymckay
Copy link
Contributor

kymckay commented Sep 8, 2016

You mean how it implicitly just passes them on to addWaypoint to sort out?

@commy2
Copy link
Contributor

commy2 commented Sep 8, 2016

Exactly

@kymckay
Copy link
Contributor

kymckay commented Sep 8, 2016

Yeah, I preserved that behaviour from before the function was ever updated just because that's how it was written.

It kind of makes sense since there's no point in validating that stuff twice and it keeps only the relevant parameters in taskPatrol. However I'm not a huge fan of it either.

@commy2
Copy link
Contributor

commy2 commented Sep 8, 2016

Meh. We can keep it, but I'd like to figure this problem out.

@commy2
Copy link
Contributor

commy2 commented Sep 8, 2016

try placing more units. when i tried one group only once it looked fine, but when you have several (as in trying to reproduce a civilian city) you got problems. more than 4 groups should do the trick

I placed 20 NATO rifle squads and put the line in every squad leader. It's crawling everywhere, but no error in sight.

Edit: Same with the module. No luck.

@Maffaxxx
Copy link
Author

Maffaxxx commented Sep 8, 2016

I tried several times to reproduce in a blank mission today but i couldnt. :-/

i have a theory on what happened. I dont think i have done this, so search me on HOW it actually happened, but different randompatrol functions got in both the init field of the unit AND in the object init of its own group. I suppose one glitchy save made a mess and displaced code around.

I am not certain this is what caused the error, because i never meant to put code in the group init field in the first place, but it got there somehow. Now, i took away all the codes, and replaced them one by one, and it seems working.

@commy2
Copy link
Contributor

commy2 commented Sep 8, 2016

So if you put the code into the group init box and into the squad leaders init box, this error happens?

@Maffaxxx
Copy link
Author

Maffaxxx commented Sep 8, 2016

i am not sure. i found different codes in the boxes, i mean the same function, but with different parameters. Sometimes a line like "this stop true" would appear in the object init of a unit that had waypoints laid out. No idea how it got there, i never write that line myself.

Really no idea how this error could have happened. now i've deleted everything and redone from scatch and the error seems to have disappeared. probably it's best treating it as a one time error and close the ticket. if it comes again ill be sure to notify you with more relevant data.

@commy2
Copy link
Contributor

commy2 commented Sep 8, 2016

ok. false alarm then.

@commy2 commy2 closed this as completed Sep 8, 2016
@commy2 commy2 removed their assignment Sep 8, 2016
@commy2 commy2 changed the title CBA_fnc_taskPatrol CBA_fnc_taskPatrol broken Sep 8, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants