SRL Archive - SRL Bugs

Prayer.scar -> function PrayerPoints: Byte need to be updated


astoria1112000

2011-11-30 03:50:36

Please check the above function

YoHoJo

2011-11-30 03:59:24

Hmm seems to work just fine for me I just tested it.
Add

writeln(ToStr(PrayerPoints));
to your script to see what it's reading your prayer points as. Mine's working just fine.

Make sure you are on fixed screen, smallest resolution, safe mode, highest brightness.

astoria1112000

2011-11-30 05:31:58

Returns some random bytes

YoHoJo

2011-11-30 05:34:26

Paste what numbers you're getting that's odd. Worked for me earlier today.
Hopefully a dev/someone will look into this then if it's not working right.

i luffs yeww

2011-11-30 10:18:48

Not really "random bytes," if I think I know what you're talking about. If prayer points are stored as a byte and your prayer level is over 25, it will overflow, or just cut off some bytes (dunno how the conversion happens, so I'm not sure).

I think.

senrath

2011-11-30 10:24:21

Yeah, it's using GetMMLevels and storing it to a Byte. I'm assuming it was written before the points were changed to level * 10, and was never updated for the switch. It just needs to change from a byte to something bigger and it'll work again.

footballjds

2011-11-30 10:31:06

From: i luffs yeww
Not really "random bytes," if I think I know what you're talking about. If prayer points are stored as a byte and your prayer level is over 25, it will overflow, or just cut off some bytes (dunno how the conversion happens, so I'm not sure).

I think.

correct completely
From: senrath
Yeah, it's using GetMMLevels and storing it to a Byte. I'm assuming it was written before the points were changed to level * 10, and was never updated for the switch. It just needs to change from a byte to something bigger and it'll work again.


integer… :P

astoria1112000

2011-11-30 22:25:53

How can I cahnge it To Integer

Coh3n

2011-12-01 22:02:30

From: astoria1112000
How can I cahnge it To Integer

Replace your PrayerPoints function with this and tell me if it works.

function PrayerPoints: Integer;
var
TmpStr: string;
begin
Result := GetMMLevels('prayer', TmpStr);
end;
Alternatively, you could just use GetMMLevels('prayer', s); in your script. Functions like that probably won't be included in future versions of SRL anyway.

E: Included in the next update.