can someone tell me the rules on this? im sat with

player before me raises to 800 (blinds 100&200) i pick up 800 in chips & consider raising the player next to me folds 7 the player after him. Another player points out that they have acted out of turn,the player next to me apologises & says he was going to call anyway the other player saye he followed the play not realising i was in. i then say i will raise but am told (by the player that folded out of turn first ) that i cannot raise because 2 players have folded after me i can only call & i cannot fold because i said raise & have to put in my 800. I am then told that i waited too long before saying anything,although nobody asked me to act & i took about 20 seconds. How can i be penalised because others players have acted wrongly .the outcome was flop

i raise 2000 (what i would have done preflop) he goes all in ,stating that he knew i was going to raise but i couldnt & probably have high cards i call & he has trip

. Are there any proper rules on things like this or is it on the house rules.What do proffessional tournaments do in a situation like this. thanks for any replies