Results 1 to 4 of 4

Thread: I'm stuck 'Expected assignment'

  1. #1
    Join Date
    Mar 2013
    Posts
    17
    Mentioned
    0 Post(s)
    Quoted
    9 Post(s)

    Default I'm stuck 'Expected assignment'

    Hello,

    I'm stuck on line 45 and it says: [Error] C:\Users\Simen\Downloads\[07] AIO Fighter Release [0.1].simba(46:4): Assignment expected at line 45
    Compiling failed.

    The code:

    ----------

    begin
    x, y integer;

    ---------
    Im trying my best to learn SRL and figure out these problems, but without help I can't.. Anyone?

    Thanks so much

    Sincerely
    Last edited by yankees; 03-09-2013 at 10:19 AM.

  2. #2
    Join Date
    Mar 2006
    Location
    Belgium
    Posts
    3,564
    Mentioned
    111 Post(s)
    Quoted
    1475 Post(s)

    Default

    Quote Originally Posted by yankees View Post
    Hello,

    I'm stuck on line 45 and it says: [Error] C:\Users\Simen\Downloads\[07] AIO Fighter Release [0.1].simba(46:4): Assignment expected at line 45
    Compiling failed.

    The code:

    ----------

    begin
    x, y integer;

    ---------
    Im trying my best to learn SRL and figure out these problems, but without help I can't.. Anyone?

    Thanks so much

    Sincerely
    should be:

    Simba Code:
    {for global variables: outside the procedures}
    var
    x, y: integer;

    ---------------------
    {for local variables: declared INSIDE the procedures}
    procedure Example;
    var
    x, y: integer;

    begin
    end;

    I recommend Coh3n's beginner tutorial as a read to basic Pascal. He explains it very well there.

    Creds to DannyRS for this wonderful sig!

  3. #3
    Join Date
    Mar 2013
    Posts
    17
    Mentioned
    0 Post(s)
    Quoted
    9 Post(s)

    Default

    Now it asks for an identifier at the variable.

    begin
    var
    x, y: integer;

    EDIT: I have tried to end the begins according to coh3ns tutorial and other solutions he has for identifier expected errors..
    Last edited by yankees; 03-09-2013 at 10:34 AM.

  4. #4
    Join Date
    Mar 2006
    Location
    Belgium
    Posts
    3,564
    Mentioned
    111 Post(s)
    Quoted
    1475 Post(s)

    Default

    Quote Originally Posted by yankees View Post
    Now it asks for an identifier at the variable.

    begin
    var
    x, y: integer;

    EDIT: I have tried to end the begins according to coh3ns tutorial and other solutions he has for identifier expected errors..
    as u see on my previous post, the begin is AFTER the variables are declared.
    But if you are using global variables (these will be used through-out the script),
    it will not need a BEGIN END; statement.

    Creds to DannyRS for this wonderful sig!

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
  •