(CAPX was sent to me privately).
So it is the parameters, and the fact that you aren't setting any. Change:
Posicao_Proxima_Plataforma=Function.Param(0)-tamanho_tela_plataforma-Distacia_Entre_Plataformas
And then for the three Plataformas calls, pass in a parameter. I don't know what numbers you want, but the following worked:
Plataformas(100)
Plataformas(-300)
Plataformas(-600)