なので、例えば、
until ((tm.gat[xy.X][xy.Y] and 1) <> 0) or (c = 100);
↑のようなgatのメモリを参照する式の手前で、
if (xy.X < 0) then beginxy.X := 0;end;
if (xy.Y < 0) then beginxy.Y := 0;end;
if (xy.X > tm.Size.X-1) then beginxy.X := tm.Size.X-1;end;
if (xy.Y > tm.Size.Y-1) then beginxy.Y := tm.Size.Y-1;end;
のような式を書いてやればエラー落ちしなくまりました。
私は、4376、4427、4599、4640、4645行目に修正を加えてあります。
xy.Xではなく、Point.Xなどとなっている場合もあるので適宜変更してください。
1: //sell
begin
w := 0;
for i := 1 to 100 do begin
if (tc.Item[i].Amount > 0) and (tc.Item[i].ID <> 0) then begin
w := w + 1;
end;
end;
WFIFOW(0, $00c7);
WFIFOW(2, 4 + w * 10);
j := 0;
for i := 1 to 100 do begin
if (tc.Item[i].Amount > 0) and (tc.Item[i].ID <> 0) then begin
j := j + 1;
WFIFOW(4 + (j-1)*10,j);
WFIFOL(6 + (j-1)*10,tc.Item[i].Data.Price);
WFIFOL(10+ (j-1)*10,tc.Item[i].Data.Price);//OC未対応
end;
end;
Socket.SendBuf(buf, 4 + w * 10);
end;
とやってみました まだ売るとこはつくってないんですが
Sell押したときに表示はされるとおもいます
なにぶんDelphiを始めて5日目なのでご指摘お願いします(;´д`)