SRL Archive - Help and Support

Does... Not... Compile...


R0b0t1

2007-09-14 15:23:36

Helpz! I wanted to know if it works in SCAR… But it stops at line 4…?


program New;

interface

type
CRSPlayer = class(TObject)
//Internal - only in this "unit" (script).
private
//Things only available in this class and decendants
protected
IUCnt: Integer;
//Externally accesible (by anything)
public
CurrPlayer: Integer;
IsMem: Boolean;
UName: String;
UPass: String;
UNick: String;
UBool: Array of Boolean;
UInts: Array of Integer;
UStrings: Array of Strings;
UExtendeds: Array of Extended;
//Yous needs constructors for classes! Go read a OOP Lang. Tut!
//You can have different ones for diff purposes. (You must
//include Create(); overload; for more than one.
//For this, you can make the Arr lengths here, or later. --> MORE
constructor Create(IsMem: Boolean; UName, UPass, UNick: String;
BoolL, IntsL, ExtendedsL, StringsL: Integer); overload;
constructor Create(IsMem: Boolean; UName, UPass, UNick: String); overload;
constructor Create; overload;
//Functions/Procedures. Do not include the working code.
function SetMemb(NewValu: Boolean): Boolean;
function SetName(NewName: String): String;
function SetPass(NewPass: String): String;
function SetNick(NewNick: String): String;
procedure SetBooleanArr(NewLengthB: Integer);
procedure SetExtendedArr(NewLengthE: Integer);
procedure SetIntegerArr(NewLengthI: Integer);
procedure SetStringArr(NewLengthS: Integer);
//Externally accesible fields/methods.
published
//properties MUST be named different.
property Member: Boolean;
read isMem;
property Name: String;
read UName;
property Pass: String;
read UPass;
property Nick: String;
read UNick;
end;

Var //Variables here.
CurrCnt: Integer;

implementation

constructor CRSPlayer.Create;
begin;
end;

constructor CRSPlayer.Create(IsMem: Boolean; UName, UPass, UNick: String;
BoolL, IntsL, ExtendedsL, StringsL: Integer);
begin
self.IsMem:= IsMem;
self.UName:= UName;
self.UPass:= UPass;
self.UNick:= UNick;
SetArrayLength(UBool, BoolL);
SetArrayLength(UInts, IntsL);
SetArrayLength(UExtendeds, ExtendedsL);
SetArrayLength(UStrings, Strings:);
end;

constructor CRSPlayer.Create(IsMem: Boolean; UName, UPass, UNick: String);
begin
self.IsMem:= IsMem;
self.UName:= UName;
self.UPass:= UPass;
self.UNick:= UNick;
end;

function CRSPlayer.SetMemb(NewValu: Boolean): Boolean;
begin
self.IsMem:= NewValu;
Result:= NewValu;
end;

function CRSPlayer.SetName(NewName: String): String;
begin
self.UName:= NewName;
Result:= NewName;
end;

function CRSPlayer.SetPass(NewPass: String): String;
begin
self.UPass:= NewPass;
Result:= NewPass;
end;

function CRSPlayer.SetNick(NewNick: String): String;
begin
self.UNick:= NewNick;
Result:= NewNick;
end;

procedure CRSPlayer.SetBooleanArr(NewLengthB: Integer);
begin;
SetArrayLength(UBool, NewLenghtB);
end;

procedure CRSPlayer.SetExtendedArr(NewLengthE: Integer);
begin;
SetArrayLength(UExtendeds, NewLenghtE);
end;

procedure CRSPlayer.SetIntegerArr(NewLengthI: Integer);
begin;
SetArrayLength(UInts, NewLenghtI);
end;

procedure CRSPlayer.SetStringArr(NewLengthS: Integer);
begin;
SetArrayLength(UStrings, NewLenghtS);
end;

end.

n3ss3s

2007-09-14 15:50:26

Well first of all, you main loop doesnt have a begin, only end xD

shaunthasheep

2007-09-14 15:57:41

It stops at line 4 because *drum roll please* it doesn't work in scar. Simple enough..

R0b0t1

2007-09-14 16:33:47

God friken damnit!

I though SCAR was kinda like I-Bot, it had all the functionality of the base language, but added more.

~alex~

2007-09-14 18:51:28

Nope, SCAR is a watered down version.