Results 1 to 8 of 8

Thread: Weird error when setting over an array

  1. #1
    Join Date
    Jun 2012
    Location
    THE Students-City of Holland
    Posts
    332
    Mentioned
    0 Post(s)
    Quoted
    4 Post(s)

    Default Weird error when setting over an array

    Hey, i'm trying to put a value of an array onto another arrayvalue with this:
    Code:
          PossibleItem[p] = item[x];
    PossibleItem is declared as this, inside a function:
    Code:
      PossibleItem : array of TItems;
    item is declared as this, outside the function, in a var at the begin of the script:
    Code:
      item : array of TItems;
    when I run the script it gives an error to this line:
    Code:
          PossibleItem[p] = item[x];


    when writing this, i just realised , I forgot the " : " so , uhhh, fixed now
    so, the lesson to learn from this is: If you get a strange error, always check if you have the " : " before the = when needed.


    anybody else ever has errors where they were stuck with for a very long time? with scripting in php, and when it doesn't give a very accurate error, sometimes I find myself looking for the error for hours, and then I realize I only forgot a ; or a . somewhere XD soooo frustrating

  2. #2
    Join Date
    Oct 2011
    Location
    UK
    Posts
    1,322
    Mentioned
    2 Post(s)
    Quoted
    1 Post(s)

    Default

    PHP errors are so vague :/ I hate simba errors at line 0, i'm like yeah.. because that exists...

  3. #3
    Join Date
    Jun 2012
    Location
    THE Students-City of Holland
    Posts
    332
    Mentioned
    0 Post(s)
    Quoted
    4 Post(s)

    Default

    Quote Originally Posted by putonajonny View Post
    PHP errors are so vague :/ I hate simba errors at line 0, i'm like yeah.. because that exists...
    haha yeah true

    I'm happy that these Simba errors are a lot easier to understand, but still some I don't understand.

    I havn't had that error on line 0 yet... what does it mean?

  4. #4
    Join Date
    Oct 2011
    Location
    UK
    Posts
    1,322
    Mentioned
    2 Post(s)
    Quoted
    1 Post(s)

    Default

    Quote Originally Posted by MasterCrimez View Post
    haha yeah true

    I'm happy that these Simba errors are a lot easier to understand, but still some I don't understand.

    I havn't had that error on line 0 yet... what does it mean?
    I think it's a bug with simba :/

  5. #5
    Join Date
    Feb 2012
    Location
    Somewhere, over the rainbow...
    Posts
    2,272
    Mentioned
    3 Post(s)
    Quoted
    45 Post(s)

    Default

    Quote Originally Posted by MasterCrimez View Post
    I havn't had that error on line 0 yet... what does it mean?
    Just added it here, means you don't have a final end.

  6. #6
    Join Date
    Oct 2011
    Location
    UK
    Posts
    1,322
    Mentioned
    2 Post(s)
    Quoted
    1 Post(s)

    Default

    Quote Originally Posted by abu_jwka View Post
    Just added it here, means you don't have a final end.
    There are other things as well, along with a load of errors that are non line specific for line specific mistakes :/

  7. #7
    Join Date
    Jun 2012
    Location
    THE Students-City of Holland
    Posts
    332
    Mentioned
    0 Post(s)
    Quoted
    4 Post(s)

    Default

    ahh I hope I won't get it then XD would be very frustrating in my script of 2000+ lines

    Edit : 3000+ NOW lol
    Last edited by Master BAW; 06-22-2012 at 12:24 PM.

  8. #8
    Join Date
    Feb 2012
    Location
    Somewhere, over the rainbow...
    Posts
    2,272
    Mentioned
    3 Post(s)
    Quoted
    45 Post(s)

    Default

    Quote Originally Posted by MasterCrimez View Post
    ahh I hope I won't get it then XD would be very frustrating in my script of 2000+ lines

    Edit : 3000+ NOW lol
    I'm guessing you have a bitmap there?

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
  •