SRL Archive - SRL Bugs

SkillsInfo Constants are broken.


Brandon

2011-12-29 14:54:35


type
Skill = record
Atk: Integer;
Str: Integer;
Def: Integer;
end;

var
SK: Skill;

Procedure SkillLevels;
begin
Sk.Atk:= GetSkillInfo(1, True);
Sk.Str:= GetSkillInfo(2, True); //strength
Sk.Def:= GetSkillInfo(3, True); //defence
end;

Procedure SkillLevels2;
begin
Sk.Atk:= GetSkillInfo(1, True);
Sk.Str:= GetSkillInfo('strength', True);
Sk.Def:= GetSkillInfo('defence', True);
end;

begin
Smart_Server := 45;
Smart_Members := True;
Smart_Signed := True;
Smart_SuperDetail := False;

setupSRL();

SkillLevels;
writeln(SK);

SkillLevels2;
writeln(SK);
end.

Results Respectively:
[BANANA]
(125, 99, 99) //This is broken..

(125, 125, 125) //This works..
[/BANANA]

Only works when using strings such as 'strength', 'defence'.. using the constants such as 2, 3 = fail.

Edit: Can someone PLEASE fix the [*Simba] tags! It's so hard to edit code when it messes it up and makes it show up like:

var

begin
dgsgs
fdgsgsgs
end;

Coh3n

2011-12-30 23:07:10

Use the constants:

SKILL_STRENGTH
SKILL_ATTACK
SKILL_DEFENSE