The problems from the first message occur, cause you have tried to give a panels position with variables inside the panel definition. This is not allowed. You may assign integer constants only. E.g. pos_x = 3;
The second error message is because SED anyhow crashes. Try to run the script with the black run button (not the red one). This has been reported to be anyhow related to chrashes in SED.