Results 1 to 8 of 8

Thread: Identifier Expected Error in forms

  1. #1
    Join Date
    Jan 2007
    Location
    Illinois.. >.<
    Posts
    1,158
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Identifier Expected Error in forms

    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.

    Code:
    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;

  2. #2
    Join Date
    May 2007
    Location
    baltimore, md
    Posts
    836
    Mentioned
    0 Post(s)
    Quoted
    8 Post(s)

    Default

    SCAR Code:
    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.
    SCAR Code:
    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 ;

  3. #3
    Join Date
    Jan 2007
    Location
    Illinois.. >.<
    Posts
    1,158
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Ok, that clears that problem up, but i now get a different Identifier expected error. The error is on line 143 according to SCAR.
    Code:
    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;

  4. #4
    Join Date
    Apr 2007
    Location
    The Netherlands
    Posts
    5,553
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

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

  5. #5
    Join Date
    May 2007
    Location
    baltimore, md
    Posts
    836
    Mentioned
    0 Post(s)
    Quoted
    8 Post(s)

    Default

    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.

  6. #6
    Join Date
    Jan 2007
    Location
    Illinois.. >.<
    Posts
    1,158
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

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

  7. #7
    Join Date
    Dec 2006
    Posts
    908
    Mentioned
    1 Post(s)
    Quoted
    17 Post(s)

    Default

    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

  8. #8
    Join Date
    Jan 2007
    Location
    Illinois.. >.<
    Posts
    1,158
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

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

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 4
    Last Post: 11-02-2008, 12:39 PM
  2. Replies: 10
    Last Post: 06-01-2008, 02:15 PM
  3. [error] (17795:1) : Identifier expected in script
    By yorkshireknight in forum OSR Help
    Replies: 15
    Last Post: 02-20-2007, 10:17 PM
  4. Replies: 4
    Last Post: 02-05-2007, 02:13 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •