Simba
Simba copied to clipboard
walker error
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".
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.