Quote:
Originally Posted by Depresie
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.
__________________