I was trying to use the ^ symbol for doing powers, but it never seemed to work in Simba (not sure whether Simba has a different way of doing indices, my computer [those it happens both on my laptop and my desktop], or there is no function existance for indices). So I created a little mini powers function. It's nothing special, and I'm guessing loads of people have created one for use in their scripts, but here it is for people who might wish to use it:
SCAR Code:function PowerOf(int, power: integer): integer;
var
i: integer;
begin
Result := int;
for i := 1 to power - 1 do
Result := Result * int;
end;
This can't deal with negative or fractional indices, I'll update this when I've created one (probably named PowerOfEx).
If there is actually a way of doing this currently, I'd love to know!![]()






Reply With Quote





