SRL Archive - OSR Help

Identifier Expected Error in forms


itSchRis917

2007-07-14 23:34:30

Here's the code, I'm trying to make a multiplayer form, I followed jhildy's tut, but i got an error.
Here's the error:
Line 109: [Error] (15098:1): Identifier expected in script C:\Program Files\SCAR 3.06\Scripts\Multiple Runecrafter.scar

No flaming please, i know this is a pretty nooby error, I know what it means, I just dont know what identifier it needs.. if that makes sense.


procedure Inititate(Sender: TObject);
begin
Players[cUser].Nick := ednick.Text;
Players[cUser].Name := eduser.Text;
Players[cUser].Pass := edpass.Text;
Players[cUser].Integer1 := (strtoint(Edess.Text));
Players[cUser].String1 := Edrune.Text;
if (Edtiara.Text = 'True')then
Players[cUser].Boolean1 := True;
else
Players[cUser].Boolean1 := False;
if (cbActive.Text = 'True') then//THIS IS LINE 109.
Players[cUser].Active := True
else
Players[cUser].Active := False;
cUser := GetArrayLength(Players) - 1;
end;

jhildy

2007-07-15 01:18:21

 if (Edtiara.Text = 'True')then
Players[cUser].Boolean1 := True;
else
Players[cUser].Boolean1 := False;
when using else you cant have a ; until the else so it should be this.
 if (Edtiara.Text = 'True')then
Players[cUser].Boolean1 := True//deleted the ; right here.
else
Players[cUser].Boolean1 := False;

there you go should work now just remember if using if something then something else the second something cant have a ;

itSchRis917

2007-07-15 09:15:46

Ok, that clears that problem up, but i now get a different Identifier expected error. The error is on line 143 according to SCAR.

procedure CreateUser(Sender: TObject);
begin
Players[cUser].Nick := ednick.Text;
Players[cUser].Name := eduser.Text;
Players[cUser].Pass := edpass.Text;
Players[cUser].Integer1 := (strtoint(Edess.Text));
Players[cUser].String1 := Edrune.Text;
if (Edtiara.Text = 'True')then
Players[cUser].Boolean1 := True
else
Players[cUser].Boolean1 := False;
if (Active.Text = 'True') then
Players[cUser].Active := True
else
Players[cUser].Active := False;
AddUser;
cUser := GetArrayLength(Players) - 1;
ednick.Text := Players[cUser].Nick;
eduser.Text := Players[cUser].Name;
edpass.Text := Players[cUser].Pass;
Strtoint(Edess.text) := Players[cUser].Integer1;
Edrune.Text := Players[cUser].String1; //THIS IS LINE 143.
if (Players[cUser].Boolean1) then
Edtiara.Text := 'True'
else
Edtiara.Text := 'False';
if (Players[cUser].Active) then
Active.Text := 'True'
else
Active.Text := 'False';
end;

ShowerThoughts

2007-08-20 10:29:01

chris lol you said you was good at this lier lol:p
i need help to its smart to make a form with the form editor?

jhildy

2007-08-20 10:35:04

07-15-2007 over a month old and it depends on how u script i prefer to organize with the form editor but i think santy does it by code.

itSchRis917

2007-08-20 12:07:10

Hermpie shut up. its over a month old, and i never used forms before that.

Claymore

2008-07-06 00:56:49

else
Players[cUser].Active := False;

Shouldn't it be like this

else
Players[cUser].Active := False //Take out ;

If so, then do that to the rest of them. Otherwise, i have no clue. (I just learned this 5 min ago. Who did i learn from? jhidly.) Just from his previous post.

when using else you cant have a ; until the else so it should be this.


I know some about SCAR and i know forms is not my strength 0.0

itSchRis917

2008-07-06 22:58:28

Umm, very impressive gravedig.. But yeah, that's the problem, fixed it a long ass time ago..