Next game (Integer value 120 changes to 120+50 = 170 during the game) :
<Sort>
Place 1: <170> <Jinx> <Slaine>
Place 2: <140> <Thanos> <Marine>.
Place 3: <120> <Jinx> <Slaine>
Place 4: <100> <Baneling> <Zealot>
<Save>
Or even: (all integer values change)
[Modify Value1 (doesn't matter which one/which order as my sorter will get the right one)] = 120 + 30 = 150
[Modify Value3] = 100 + 60 = 160
[Modify Value4] = 140 + 100 = 240
<Sort>
Place 1: <240> <Thanos> <Marine>.
Place 2: <160> <Baneling> <Zealot>
Place 3: <170> <Jinx> <Slaine>
Place 4: <150> <Jinx> <Slaine>
Place 5: <140> <Thanos> <Marine>.
Place 6: <120> <Jinx> <Slaine>
Place 7: <100> <Baneling> <Zealot>
<Save>
And then, next game:
(Player Thanos is no more playing therefore not in the game, Player Baneling has gone as well, value x becomes value 170 = 170 + 200 = 370)
<Sort>
Place 1: <370> <Jinx> <Slaine>
Place 2: <240> <Thanos> <Marine>. [not playing]
Place 3: <160> <Baneling> <Zealot> [not playing]
Place 4: <170> <Jinx> <Slaine>
Place 5: <150> <Jinx> <Slaine>
Place 6: <140> <Thanos> <Marine>. [not playing]
Place 7: <120> <Jinx> <Slaine>
Place 8: <100> <Baneling> <Zealot> [not playing]
<Save>
Problem:
As you can see, my sorting system only gets integer values and is able to clear them if they have the same value and position in its integer array. If two different players have the same value, then it's randomly decided who gets the higher place; the other will get the place one place lower (ex: one will get place 43, the other 44). What my sorting system can't, is to check if the PlayersName AND HeronameID are the same at the taken integer value to then delete further values of the same type. Therefore, for example, all other, previously stored <Jinx> <Slaine> stats will be sorted and stored as well, instead of deleting them.
What I Need
PlayersNames are stored as text, HeronamesID as Integer/text. PlayerNames, stored as text, are stored as those for that I can recall their names, even if the players are not in the game. I now need to find any way to make a condition compare both PlayerNames with Playernames2 AND HeronamesID with HeronamesID2 to clearly specify which further integer values should be deleted as well. Means, I probably need something that lets a condition compare text with text. Any solutions? Tried to convert the text to string already, didn't work.
I'd be glad for any help. Been trying to find a working way for hours now. Will keep trying to figure out a solution meanwhile.
I found the solution: I tagged each successful loop with function that I just recently have discovered: "handle of player <int>", by using it in a string array. This turned out to be working just perfectly, eliminating all preexisting and lower values.
I think writing down my problem helped me find the right solution though- and got my sorter to where I wanted it to be.
Best regards
Yunishaa
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
Hey guys
I really need your help since I'm quite stuck.
I'll try to describe my problem as good as I can.
Actually I'm making a sorting-system that takes given integer values and sorts them from 1 to 50. 1 is the highest value, 50 the lowest.
3 Values will then be stored into bank: <Name of Player>, <integer value> and <Hero played>.
Explanation:
What happens now is (examples):
Example-stats:
Lets say 1. integer value = <100>, player who got the value = <Baneling>, the hero that Player "Baneling" played = <Zealot>.
Lets say 2. integer value = <140>, player who got the value = <Thanos>, the hero that Player "Thanos" played = <Marine>.
Lets say 3. integer value = <120>, player who got the value = <Jinx>, the hero that Player "Jinx" played = <Slaine>.
<Sorting by integer>
Restults:
[Place x: <Integer> <Playername> <Hero>]
x=1 to 50
Place x(=1): <140> <Thanos> <Marine>.
Place x(=2): <120> <Jinx> <Slaine>
Place x(=3): <100> <Baneling> <Zealot>
...
<Save>
Next game (No integers were changed) :
<Sort>
Place 1: <140> <Thanos> <Marine>.
Place 2: <120> <Jinx> <Slaine>
Place 3: <100> <Baneling> <Zealot>
<Save>
Because:
<Sort>
If: [Case1] <140> <Thanos> <Marine> = [Case2] <140> <Thanos> <Marine>
(Means:
If: 140 = 140
and check position = checkPositionChecker
)
Then: Delete: [Case2]
<Keep sorting>
and so on.
BUT:
Next game (Integer value 120 changes to 120+50 = 170 during the game) :
<Sort>
Place 1: <170> <Jinx> <Slaine>
Place 2: <140> <Thanos> <Marine>.
Place 3: <120> <Jinx> <Slaine>
Place 4: <100> <Baneling> <Zealot>
<Save>
Or even: (all integer values change)
[Modify Value1 (doesn't matter which one/which order as my sorter will get the right one)] = 120 + 30 = 150
[Modify Value3] = 100 + 60 = 160
[Modify Value4] = 140 + 100 = 240
<Sort>
Place 1: <240> <Thanos> <Marine>.
Place 2: <160> <Baneling> <Zealot>
Place 3: <170> <Jinx> <Slaine>
Place 4: <150> <Jinx> <Slaine>
Place 5: <140> <Thanos> <Marine>.
Place 6: <120> <Jinx> <Slaine>
Place 7: <100> <Baneling> <Zealot>
<Save>
And then, next game:
(Player Thanos is no more playing therefore not in the game, Player Baneling has gone as well, value x becomes value 170 = 170 + 200 = 370)
<Sort>
Place 1: <370> <Jinx> <Slaine>
Place 2: <240> <Thanos> <Marine>. [not playing]
Place 3: <160> <Baneling> <Zealot> [not playing]
Place 4: <170> <Jinx> <Slaine>
Place 5: <150> <Jinx> <Slaine>
Place 6: <140> <Thanos> <Marine>. [not playing]
Place 7: <120> <Jinx> <Slaine>
Place 8: <100> <Baneling> <Zealot> [not playing]
<Save>
Problem:
As you can see, my sorting system only gets integer values and is able to clear them if they have the same value and position in its integer array. If two different players have the same value, then it's randomly decided who gets the higher place; the other will get the place one place lower (ex: one will get place 43, the other 44). What my sorting system can't, is to check if the PlayersName AND HeronameID are the same at the taken integer value to then delete further values of the same type. Therefore, for example, all other, previously stored <Jinx> <Slaine> stats will be sorted and stored as well, instead of deleting them.
What I Need
PlayersNames are stored as text, HeronamesID as Integer/text. PlayerNames, stored as text, are stored as those for that I can recall their names, even if the players are not in the game. I now need to find any way to make a condition compare both PlayerNames with Playernames2 AND HeronamesID with HeronamesID2 to clearly specify which further integer values should be deleted as well. Means, I probably need something that lets a condition compare text with text. Any solutions? Tried to convert the text to string already, didn't work.
I'd be glad for any help. Been trying to find a working way for hours now. Will keep trying to figure out a solution meanwhile.
Best regards
Yunishaa
Ok
I found the solution: I tagged each successful loop with function that I just recently have discovered: "handle of player <int>", by using it in a string array. This turned out to be working just perfectly, eliminating all preexisting and lower values.
I think writing down my problem helped me find the right solution though- and got my sorter to where I wanted it to be.
Best regards
Yunishaa