Simba icon indicating copy to clipboard operation
Simba copied to clipboard

walker error

Open Godji46 opened this issue 11 months ago • 1 comments

begin
  Self.Name := 'Walker';

  minimapImage := Minimap.GetCleanMinimap();
  minimapSample := Minimap.ScaleMinimap(minimapImage, Self.Scaling);

  Self.Cache := TMatchTemplateRGBCache.Create(Self.Map.ScaledMap.ToMatrix(), MinimapSample.ToMatrix());
  Self.WalkUpText := ['Walk here', 'lk he'];

  minimapSample.Free();
  minimapImage.Free();
end;

Edit by slacky: This references Simba 1.4 issue where the cache allocation

TMatchTemplateRGBCache.Create(Self.Map.ScaledMap.ToMatrix(), MinimapSample.ToMatrix());

causes "Invalid floating point operation".

Godji46 avatar Jan 21 '25 19:01 Godji46

Image

Adding this image as an attachment, image comes from the user that created this issue.

Personally I have no idea why this issue comes up, but if this is unchanged in Simba 2.0 we could add some security measures so that proper errors are raised on bad input - now I'd assume a blank cache matrix (all white, all black etc) would be bad for example.

slackydev avatar Jan 27 '25 16:01 slackydev