I'm sorry for asking such a simple question, but I can't an haven't found a reference to my problem. Its fairly simple, and I don't think it will require much change over-all (I hope anyway).
By the way: Its a plugin designed for an human interaction program designed for games etc., so thus the game references.
ERROR: Compiler requests a colon after "public" keyword, but when I [b]do[/b] actually put it there it gives me another error. Ehh...?
{
This file is part of SCAR (Shi*e Compared To AutoRune) Resource Library
Copyright (c) 2007 by alias R0b0t1
Player Information Routines
See the file COPYING.FPC, included in this distribution,
for details about the copyright.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
**********************************************************************}
{$MODE Delphi}
{$DEFINE Ver0.1}
{$M+}
unit UsersInc;
interface
uses Windows;
type
TRS2Player = class
private
//---------------------------------------------------------
protected
//---------------------------------------------------------
public
IsMem: Boolean;
UName: String;
UPass: String;
UNick: String;
UBool: Array of Boolean;
UInts: Array of Integer;
UStrings: Array of String;
UExtendeds: Array of Extended;
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;
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);
//---------------------------------------------------------
published
property Member: Boolean;
read isMem;
property Name: String;
read UName;
property Pass: String;
read UPass;
property Nick: String;
read UNick;
end;
implementation
constructor TRS2Player.Create;
begin
end;
constructor TRS2Player.Create(IsMem: Boolean; UName, UPass, UNick: String;
BoolL, IntsL, ExtendedsL, StringsL: Integer);
begin
Try
self.IsMem:= IsMem;
self.UName:= UName;
self.UPass:= UPass;
self.UNick:= UNick;
Except
on E: Exception do
begin
Write(E.ClassName+': '+E.Message);
Write('Lay Speak: You messed up the types! (Ints as Strings etc.)');
end;
Try
SetLength(UBool, BoolL);
SetLength(UInts, IntsL);
SetLength(UExtendeds, ExtendedsL);
SetLength(UStrings, Strings:);
Except
on E: Exception do
begin
Write(E.ClassName+': '+E.Message);
Write('Lay Speak: Bad array length(s)! (0 and up is O.K.)');
end;
end;
constructor TRS2Player.Create(IsMem: Boolean; UName, UPass, UNick: String);
begin
Try
self.IsMem:= IsMem;
self.UName:= UName;
self.UPass:= UPass;
self.UNick:= UNick;
Except
on E: Exception do
begin
Write(E.ClassName+': '+E.Message);
Write('Lay Speak: You messed up the types!');
end;
end;
function TRS2Player.SetMemb(NewValu: Boolean): Boolean;
begin
self.IsMem:= NewValu;
Result:= NewValu;
end;
function TRS2Player.SetName(NewName: String): String;
begin
self.UName:= NewName;
Result:= NewName;
end;
function TRS2Player.SetPass(NewPass: String): String;
begin
self.UPass:= NewPass;
Result:= NewPass;
end;
function TRS2Player.SetNick(NewNick: String): String;
begin
self.UNick:= NewNick;
Result:= NewNick;
end;
procedure TRS2Player.SetBooleanArr(NewLengthB: Integer);
begin;
SetLength(UBool, NewLenghtB);
end;
procedure TRS2Player.SetExtendedArr(NewLengthE: Integer);
begin;
SetLength(UExtendeds, NewLenghtE);
end;
procedure TRS2Player.SetIntegerArr(NewLengthI: Integer);
begin;
SetLength(UInts, NewLenghtI);
end;
procedure TRS2Player.SetStringArr(NewLengthS: Integer);
begin;
SetLength(UStrings, NewLenghtS);
end;
end.