Results 1 to 3 of 3

Thread: Identifier expected error again...

  1. #1
    Join Date
    Dec 2009
    Location
    Newcastle, Australia
    Posts
    888
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Identifier expected error again...

    Its been a while, and I am slightly rusty, and I am creating a computer version of a game called "Rum Rebellion". However I am running into some trouble just shuffling the cards...I am getting the most annoying error there is...."Identifier expected at line 6". I am using Simba, but I don't know how to fix this error...I have the right amount of begins and ends.
    SCAR Code:
    program new;

    Const
    //Amounts of each card type
    //Vote of Support
    10vot = 12;
    5vot = 24;
    3vot = 36;
    //Win or lose
    WinWOL = 6;
    LoseWOL = 6;
    //The Court Verdicts
    FreeVerd = 4;
    FineVerd = 4;
    GaolVerd = 4

    Vot = 1;

    type
      Deck = record
        CardID: TIntegerArray;
      end;

    var
      Decks: Array[1..4] of Deck;
      J : Integer;

    Procedure FirstShuffle;
    var
      I, Number: Integer;
      ArrNumbers: TIntegerArray;
    begin
      SetLength(Deck[Vot].CardID, 72)
      SetLength(ArrNumbers, 72);
      I := 0
      repeat
        Number := RandomNumber(1, 72);
        if not InIntArray(ArrNumbers, Number) then
        begin
          ArrNumbers[I] := Number;
          Inc(I)
        end;
      until not InIntArray(ArrNumbers, 0);

      For I := 0 to 71 do
      begin
        case ArrNumbers[I] of
          1..12 : Deck[Vot].CardID[I] := 1;
          13..36 : Deck[Vot].CardID[I] := 2;
          37..72 : Deck[Vot].CardID[I] := 3;
        end;
      end;
    end;


    {Procedure Shuffle(Which: Integer);
    begin
    end
     }



    begin
      FirstShuffle;
      For J := 0 to 71 do
      begin
        case Decks[Vot].CardID[J] of
          1 : Writeln('10 Votes');
          2 : Writeln('5 Votes');
          3 : Writeln('3 Votes');
        else
          Writeln('Error, Returned ' + IntToStr(Decks[Vot].CardID[J]));
        end;
      end;
    end.
    Last edited by Bad Boy JH; 08-14-2010 at 03:27 AM.

    Current Script Project
    Pot of flour gatherer - 95% done

    Can't get Simba to work? Click here for a tutorial

  2. #2
    Join Date
    Apr 2008
    Location
    Marquette, MI
    Posts
    15,252
    Mentioned
    138 Post(s)
    Quoted
    680 Post(s)

    Default

    First off, wrong section. Should be in Scripting Help.

    Also, you can't have constants start with numbers. Call it vot10, etc and it will work. You'll also notice you have other compiling issues.

  3. #3
    Join Date
    Dec 2009
    Location
    Newcastle, Australia
    Posts
    888
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    obviouisly, I am too tired to be scripting ATM, so my appologies...yes, I have noticed them, I started checking a couple of things and found them...thanks for the help...

    Current Script Project
    Pot of flour gatherer - 95% done

    Can't get Simba to work? Click here for a tutorial

Thread Information

Users Browsing this Thread

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

Posting Permissions

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