SCAR Code:
type
TVariable = Record
FoodType, KnifeType : String;
FightingStyle, Skill : Integer;
PickupKnives : Boolean;
end;
var
Variable : array of TVariable;
ChooseName : String;
procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
SetLength(Variable, HowManyPlayers);
CurrentPlayer := 0;
Players[0].Name :='';
Players[0].Pass :='';
Players[0].Nick :='';
Players[0].Active := True;
Variable[0].FoodType := 'lobster'; // Options: lobster, swordfish, monkfish, shark
Variable[0].Skill := 4; //Options: attack: 0, defence: 1, strength: 2, ranged: 4
Variable[0].FightingStyle := 1; // Fighting Style: 1, 2, 3, 4
Variable[0].PickupKnives := True; // Pickup the Ranged wepons you used that are on the ground. If your melee set this to False
Variable[0].KnifeType := 'iron'; // Options: Bronze, Iron, Steel, Black, Mithril, Adamant, Rune
end;
procedure SetupVariables;
begin
case Variable[CurrentPlayer].KnifeType of
'bronze': ChooseName := 'onze';
'iron': ChooseName := 'ron';
'steel': ChooseName := 'teel';
'black': ChooseName := 'lack';
'mithril': ChooseName := 'hril';
'adamant': ChooseName := 'amant';
'rune': ChooseName := 'une';
end;
end;
and i get this error: [Runtime Error] : Out Of Range in line 80 in script C:\Users\Lance\Desktop\My Scripting Projects\Reflection\Yak Pwner\Yak Pwner 0.1.scar
it works while compiled but yeah, just when running it screws up.
btw "case Variable[CurrentPlayer].KnifeType of" is line 80