SRL Archive - OSR Help

Object Reference Leaked in: Get3DObject??


Rare Scripts

2015-06-07 12:34:14

Fixed :) Thanks all!

ineedbot

2015-06-07 14:34:08

Right here;
OurObject.Find(objGame, 'Lava forge', 11);

if OurObject.Find(objGame,'Lava forge',) then

The OurObject.Find(objGame,'Lava forge',) is defaulting to look for the object in a 103 tile radius by default. You only need to call TReflectObject.Find once. (so use it only on the if statement)

Also you shouldn't need to TReflectObject.Free (i dont think it can be used anyway,), its done on TReflectObjectArray.GetAll; (used when you use ANY TReflectObject function).

Rare Scripts

2015-06-07 14:37:04

From: ineedbot
Right here;
OurObject.Find(objGame, 'Lava forge', 11);

if OurObject.Find(objGame,'Lava forge',) then

The OurObject.Find(objGame,'Lava forge',) is defaulting to look for the object in a 103 tile radius by default. You only need to call TReflectObject.Find once. (so use it only on the if statement)

Also you shouldn't need to TReflectObject.Free (i dont think it can be used anyway,), its done on TReflectObjectArray.GetAll; (used when you use ANY TReflectObject function).


Oops i areally changed to:

if OurObject.Find(objGame,'Lava forge',11) then forgot the 11. but still nto working,.


if OurObject.Find(objGame,'Lava forge',11) then
begin

ineedbot

2015-06-07 14:52:43

Weird… cause I just tried this;
procedure getObj;
var OurObject : TReflectObject;
Point : TPoint;
begin
if OurObject.Find(ObjGame, 'Furnace', 11) then begin
Point := Reflect.Tiles.TileToMs(OurObject.GetTile);
writeln(Point);
end;
end;

And it was working just fine.

I'm sure you are up to date with the include.. I'm not sure why you would be getting this error,

Rare Scripts

2015-06-07 14:54:04

From: ineedbot
Weird… cause I just tried this;
procedure getObj;
var OurObject : TReflectObject;
Point : TPoint;
begin
if OurObject.Find(ObjGame, 'Furnace', 11) then begin
Point := Reflect.Tiles.TileToMs(OurObject.GetTile);
writeln(Point);
end;
end;

And it was working just fine.


Thanks mate! :)

Edit: Still didnt find :(
i was about to try IDs but it looks like the object got no ID… Lol o_O Also seen that on wall Glory in house before.

Using ID Display from simba tools section i think.

Edit1: It seems to work on normal furnace i see, but on Tzhaar it wont see.