Raised This Month: $ Target: $400
 0% 

[HELP]Save Group Damage


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 10-18-2015 , 07:01   Re: [HELP]Save Group Damage
Reply With Quote #1

Quote:
Originally Posted by Depresie View Post
as i said, i have tried with a bool before and i saved values in the bool via user in the loop, but when a player joined the group the group damage for him was 0 instead of the damage done by the group before he joined.

Last time i tried with arrays, i didnt know what the heck im doing, and the result code is above...
btw, total inflicted damage is what im looking for
You sound like you have no idea what you're talking about. Again, a bool means true or false, those are the only 2 possible values. What you are actually using, whether you want to accept it or not, is an array of integers (numbers).

You are defining an array type of Array: Party_Ids[33] but are not using any of the cellarray natives. If you are not using the cellarray natives, just define an array simply as Party_Ids[33] with no 'Array:' tag.

You need to provide more code if you want help--providing a piece of code that can be compiled is always preferred so the code can be troubleshooted. You left out the get_party_index() function which could be the part of your code that is broken. How many parties are there? Not enough info to know what is going on.

I see you have:
PHP Code:
g_PartyData[Damage_In_Party
then you have
PHP Code:
g_PartyData[attacker][Damage_In_Party
This is 2 dimensional array, you can't just give it 1 index and expect it to know what you are trying to do. The code is only as smart as you tell it to be, it cannot read you mind.

You need to re-think your data handling and be consistent with it. What I would do is use a bit-field for each group, and assign players to it. Then use a separate variable to keep track of how much damage is associated with that group.
__________________

Last edited by Bugsy; 10-18-2015 at 07:26.
Bugsy is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 22:03.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode