Problem with give house to different player.
PostPosted: 07 Aug 2014, 14:34
The problem stems from the script
The script works, but after some time error pops up.
I sent an error report. I would be grateful if someone helped me with this.
Bug only occurs enter the code Actions.GiveHouse.
- Code:
procedure OnTick; var budynki, ludzie: array of integer; t,x,y,i: integer; begin if (States.StatArmyCount(1) = 0) then begin ludzie:= States.PlayerGetAllUnits(1); for i:=0 to (length(ludzie)-1) do begin Actions.UnitKill(ludzie[i],true); end; budynki:= States.PlayerGetAllHouses(1); for i:=0 to (length(budynki)-1) do begin t:= States.HouseType(budynki[i]); x:= States.HousePositionX(budynki[i]); y:= States.HousePositionY(budynki[i]); Actions.HouseDestroy(budynki[i],true); Actions.GiveHouse(0, t, x, y); end; end; end;
I sent an error report. I would be grateful if someone helped me with this.
Bug only occurs enter the code Actions.GiveHouse.