Skip to content
This repository has been archived by the owner on Apr 17, 2022. It is now read-only.

groupAddAreaNoGroup() not working properly #889

Closed
wzdev-ci opened this issue Sep 7, 2009 · 16 comments
Closed

groupAddAreaNoGroup() not working properly #889

wzdev-ci opened this issue Sep 7, 2009 · 16 comments

Comments

@wzdev-ci
Copy link
Contributor

wzdev-ci commented Sep 7, 2009

keyword_groupAddAreaNoGroup resolution_fixed type_bug | by DylanDog


The function groupAddAreaNoGroup() is not working properly as it adds to the given group even the units which are already grouped.

I have tested it also in the following way, I have added on the event which is called when a game is initialezed the following code:

groupAddArea(aGroup, player, 0, 0, (mapWidth*128), (mapHeight*128));
groupAddAreaNoGroup(bGroup, player, 0, 0, (mapWidth*128), (mapHeight*128));
msg("bGroup Members ("& bGroup.memebrs &") ",player_from,player_to);

On the map SK-Rush the message displays always
"bGroup Members (2)"
which is obviusly wrong.

without this function managing groups is quite hard.


Issue migrated from trac:889 at 2022-04-15 19:12:05 -0700

@wzdev-ci
Copy link
Contributor Author

wzdev-ci commented Sep 7, 2009

Per commented


"bGroup.memebrs" -- did you also test without the misspelling? The C code in question looks fine to me. Can you also output the results of the groupAddArea command, to see if it worked?

@wzdev-ci
Copy link
Contributor Author

wzdev-ci commented Sep 7, 2009

DylanDog commented


Replying to Warzone2100/old-trac-import#889 (comment:1):

"bGroup.memebrs" -- did you also test without the misspelling? The C code in question looks fine to me. Can you also output the results of the groupAddArea command, to see if it worked?
Yes, I tested without the misspelling, "" would generate an error with this misspelling.
GroupAddArea works fine, I am using it the whole time to develop my AI (DyDo-BP) and it is used by BP and AIvolution too. Also no other AI uses groupAddAreaNoGroup()...even Aivolution which makes reat use of groups/teams.
If you want I can modify the standard warzone AI, send you the modified version so that you can see it on your own?

@wzdev-ci
Copy link
Contributor Author

wzdev-ci commented Sep 7, 2009

DylanDog commented


I meant "c" code would generate an error with the misspelling. You could not compile it.

@wzdev-ci
Copy link
Contributor Author

wzdev-ci commented Sep 7, 2009

Per commented


Yes, please send a modified AI code that I can test.

@wzdev-ci
Copy link
Contributor Author

wzdev-ci commented Sep 8, 2009

DylanDog uploaded file pl0_groupAddAreaNoGroup.wz (391.2 KiB)

use player 0 !!

@wzdev-ci
Copy link
Contributor Author

wzdev-ci commented Sep 8, 2009

DylanDog commented


File attached, use the wz as mod and play with player 0! you will see on the top left of the screen the two debug messages.

The code added to player0.slo is the following:

 //DylanDog
  dbgMsgOn(me, true);
	
  groupAddArea(aGroup, me, 0, 0, (mapWidth*128), (mapHeight*128));
  dbg("aGroup members ("& aGroup.members &") ",me);
  
  groupAddAreaNoGroup(bGroup, me, 0, 0, (mapWidth*128), (mapHeight*128));
  dbg("bGroup members ("& bGroup.members &") ",me);

...and obviously I have added the variable declaration too:

private GROUP aGroup, bGroup;

There are also two jpg files with screendumps showing the debug messages on the maps:sk-Rush and sk-CloseComba

Please fix this as without groupAddAreaNoGroup() I would have to create an ad-hoc group management which would requires many functions, checks and so on...

Thanks!!!!

@wzdev-ci
Copy link
Contributor Author

Per commented


(In [8172]) 2.2: Fix scrGroupAddAreaNoGroup script function, was called as scrGroupAddArea instead.
Closes #889 reported by DylanDog.

@wzdev-ci
Copy link
Contributor Author

Per commented


(In [8173]) Fix scrGroupAddAreaNoGroup script function, was called as scrGroupAddArea instead.
Closes #889 reported by DylanDog.

@wzdev-ci
Copy link
Contributor Author

Per changed status from new to closed

@wzdev-ci
Copy link
Contributor Author

Per changed operating_system which not transferred by tractive

@wzdev-ci
Copy link
Contributor Author

Per set resolution to fixed

@wzdev-ci
Copy link
Contributor Author

Per changed milestone from `` to 2.2.4

@wzdev-ci
Copy link
Contributor Author

Per commented


groupAddAreaNoGroup and groupAddArea turned out to be the same function... Fixed for the next release.

@wzdev-ci
Copy link
Contributor Author

DylanDog commented


FIXED! this is a great thing, I see you have put this as milestone for 2.2.4 -> great!!
I am working on my new AI and this will help a lot the group management!!

thanks!

@wzdev-ci
Copy link
Contributor Author

wzdev-ci commented May 8, 2010

Buginator removed milestone (was 2.2.4)

@wzdev-ci
Copy link
Contributor Author

wzdev-ci commented May 8, 2010

Buginator commented


Milestone 2.2.4 deleted

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant