The Bank Terran Unit Encryption Difficulty and Unit[1][1] would be then (easy difficulty encrypted + marine encrypted) which is definately in the bank file so the statement should return true, but I think it is checking something else like BasharTeg said. I am still anaylizing it when I get time and will post my results when I figure it out, or if I give up and just hardcode it. :-)
@Stragus: I do that in the map initialize trigger. ;-) And I inserted variables which is how I found out that it isn't going into the loop at all.
@Bashar: Very possible that it is checking for 2 strings. That would at least explain why it is never true and also why the less efficient version works. You store all of your data in one long string and then use substring? That may be something I could implement. Would you give me a little example of how I can save something into a string that already exists? This is something I have never done, so details would be great!
True. What I am trying to do is find out if the player has completed each difficulty level (there are 6) with a certain unit, let's say Marine. The bank are loaded and the encryption/decryption works fine as the values in the first example directly translate to the variables in the second example. The only thing is, is that the loop doesn't seem to realize when the statement is true, which is odd, because when I type it out (first example) it works fine.
I was just trying to find out if there is an error in my loop that I am not seeing. The loop (should) works like this:
Loop through the difficulty levels and through the types of units (all have been assigned numbers for ease of tracking). So it runs like this: Unit 1 - Difficulty 1 - true/false. Unit 1 - Difficulty 2 - true/false etc...
In the first example, znevar is Marine and the letter in front of that is for the difficulty level that I combine together with Combine String. The values are like that in the bank file, but the loop somehow doesn't go into the true part.
If you could just look at the loop and see if there are any errors that I am not seeing, that would be great. :)
@SouLCarveRR: Go
Yes. This statement:
Is never true, even though it should be. For example if the current statement is this:
The Bank Terran Unit Encryption Difficulty and Unit[1][1] would be then (easy difficulty encrypted + marine encrypted) which is definately in the bank file so the statement should return true, but I think it is checking something else like BasharTeg said. I am still anaylizing it when I get time and will post my results when I figure it out, or if I give up and just hardcode it. :-)
@BasharTeg: Go
Very nice! I will definately give this a shot. It may prove to help alot. Thank you so much!
@Kueken531: Go
Danke Kueken! I forgot to mention that I am using 3 nested loops in other triggers and it works fine. :-)
I will try debugging again, adding more text messages. We'll see what I come up with.
@BasharTeg: Go
@Stragus: I do that in the map initialize trigger. ;-) And I inserted variables which is how I found out that it isn't going into the loop at all.
@Bashar: Very possible that it is checking for 2 strings. That would at least explain why it is never true and also why the less efficient version works. You store all of your data in one long string and then use substring? That may be something I could implement. Would you give me a little example of how I can save something into a string that already exists? This is something I have never done, so details would be great!
Thanks!
@BasharTeg: Go
True. What I am trying to do is find out if the player has completed each difficulty level (there are 6) with a certain unit, let's say Marine. The bank are loaded and the encryption/decryption works fine as the values in the first example directly translate to the variables in the second example. The only thing is, is that the loop doesn't seem to realize when the statement is true, which is odd, because when I type it out (first example) it works fine.
I was just trying to find out if there is an error in my loop that I am not seeing. The loop (should) works like this:
Loop through the difficulty levels and through the types of units (all have been assigned numbers for ease of tracking). So it runs like this: Unit 1 - Difficulty 1 - true/false. Unit 1 - Difficulty 2 - true/false etc...
In the first example, znevar is Marine and the letter in front of that is for the difficulty level that I combine together with Combine String. The values are like that in the bank file, but the loop somehow doesn't go into the true part.
If you could just look at the loop and see if there are any errors that I am not seeing, that would be great. :)
Faust
Hi guys,
I have the following in a save trigger:
Note: There are only 4 players at most. This: "Algorythm_Rank[(Picked player)][12] = 1" refers to the 12th unit type and not 12th player
This works just fine, but is very inefficient. I had this in a loop with arrays but it wasn't saving. See here:
I can't figure out why this isn't working. Any tips on something I may have missed? The values exist in the player bank, but somehow it doesn't work.
Thanks!!
Faust