Can you explain what exactly are you trying to do? Maybe we can come up w/ a different design. I'm not sure what's wrong with your code from the snippet you sent (aside from the fact that it looks very inefficient).
It's my first contract, so every tips is welcome, how could i increase the efficiency of my code?
The main idea is create a simple DAPP to hold ETH value, like an escrow, so i have 3 structs arrays, (open, paid, canceled) in this case i need to search for the sender in 3 arrays and return.
Is the way I'm doing it correct?
Can I make a DAPP with just the blockchain (no database needed)?
Oh, sorry, when a make this snippet didn't end up paying attention...
I think I found the problem...
Maybe it's the fault of delete Tests1[i], Tests2[i] and Tests3[i], when i use the delete i has creating a gap in the array.
If i try with Count instead Test[1,2,3]Lenght it work... sounds like i break the array because of my lenght variable...
When i create an test1 i use Tests1Lenght++;
When i update an test1 to test2 i use Tests1Lenght-- && Tests2Lenght++;
What would be the best approach for this?
Any idea?
Thanks for everything
Update:
The problem is:
When i run the for in Counter, the counter can be more then test[1,2,3]lenght so he try to create a position like test1[counter] but the counter is bigger then test1lenght and i use the test1lenght to define the size of the array (STest1 memory tests1 = new STest1;).