Results 1 to 19 of 19

Thread: What am I doing wrong?

  1. #1
    Join Date
    Oct 2012
    Location
    Porto, Portugal
    Posts
    218
    Mentioned
    0 Post(s)
    Quoted
    42 Post(s)

    Question What am I doing wrong?



    http://prntscr.com/jgw8u

    I keep getting closing parenthesis error. Someone help me here? What parenthesis is wrong?

  2. #2
    Join Date
    Jan 2012
    Posts
    2,568
    Mentioned
    35 Post(s)
    Quoted
    356 Post(s)

    Default

    Post the code instead? You probably add an extra/missed up a bracket somewhere.

    Also even if the parenthesis fixed you will get an out of range error because the index of an array always starts with 0. Change the for loop to 0 to 27.

    Also if you are intending to make it write every TPA[i] you need a begin.

  3. #3
    Join Date
    Oct 2012
    Location
    Porto, Portugal
    Posts
    218
    Mentioned
    0 Post(s)
    Quoted
    42 Post(s)

    Default

    Post the code instead?
    This is the code. Im just testing.



    You probably add an extra/missed up a bracket somewhere.
    That is the problem I cant find where



    Also even if the parenthesis fixed you will get an out of range error because the index of an array always starts with 0. Change the for loop to 0 to 27.

    Also if you are intending to make it write every TPA[i] you need a begin.
    Thanks forgot that
    Last edited by Sax; 11-11-2012 at 01:19 PM.

  4. #4
    Join Date
    Feb 2007
    Location
    Het ademt zwaar en moedeloos vannacht.
    Posts
    7,211
    Mentioned
    26 Post(s)
    Quoted
    72 Post(s)

    Default

    You forgot the IntToPoint
    I made a new script, check it out!.

  5. #5
    Join Date
    Dec 2007
    Posts
    2,112
    Mentioned
    71 Post(s)
    Quoted
    580 Post(s)

    Default

    Quote Originally Posted by Markus View Post
    You forgot the IntToPoint
    This :P

  6. #6
    Join Date
    Oct 2012
    Location
    Porto, Portugal
    Posts
    218
    Mentioned
    0 Post(s)
    Quoted
    42 Post(s)

    Default

    Thanks

  7. #7
    Join Date
    Oct 2012
    Location
    Porto, Portugal
    Posts
    218
    Mentioned
    0 Post(s)
    Quoted
    42 Post(s)

    Default

    Now, I have another problem...

    Invalid number of parameters...



    http://puu.sh/1q9sU

    What is wrong here?

  8. #8
    Join Date
    Nov 2008
    Location
    Norway, Alesund
    Posts
    924
    Mentioned
    0 Post(s)
    Quoted
    37 Post(s)

    Default

    Quote Originally Posted by Nirvana View Post
    Now, I have another problem...

    Invalid number of parameters...


    What is wrong here?
    Post plain text, between [simba ] [/simba] tags. not screen shots! Specially so long, which deforms website style.

    Plain text is easier to check, fix, help.

  9. #9
    Join Date
    May 2007
    Location
    UK
    Posts
    4,007
    Mentioned
    1 Post(s)
    Quoted
    12 Post(s)

    Default

    Quote Originally Posted by Nirvana View Post
    Now, I have another problem...

    Invalid number of parameters...



    http://puu.sh/1q9sU

    What is wrong here?
    Iirc you need to define whether you want to left or right click. Last param is either true (right click) or false (left click)

  10. #10
    Join Date
    Dec 2011
    Location
    Hyrule
    Posts
    8,662
    Mentioned
    179 Post(s)
    Quoted
    1870 Post(s)

  11. #11
    Join Date
    Oct 2012
    Location
    Porto, Portugal
    Posts
    218
    Mentioned
    0 Post(s)
    Quoted
    42 Post(s)

    Default

    Quote Originally Posted by Dynamite View Post
    Iirc you need to define whether you want to left or right click. Last param is either true (right click) or false (left click)
    oh im retarded! thanks

  12. #12
    Join Date
    Oct 2012
    Location
    Porto, Portugal
    Posts
    218
    Mentioned
    0 Post(s)
    Quoted
    42 Post(s)

    Default

    what does it mean when it says out of range?
    I have a Array of TIntegerArray like this:

    Simba Code:
    Arrayy[0] := [1, 2, 4, 3, 1, 9, 25, 26, 4, 18, 1, 7, 6, 2, 5, 7, 1, 5, 9, 3, 2, 8, 4, 20, 16, 12, 8, 4];
    Arrayy[1] := [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28];
    Arrayy[2] := [1, 2, 3, 4, 5, 7, 9, 5, 9, 10, 1, 12, 6, 15, 4, 1, 17, 1, 1, 8, 24, 3, 22, 21, 25, 26, 27, 28];
    Arrayy[3] := [1, 5, 9, 1, 1, 1, 2, 2, 6, 1, 1, 1, 2, 2, 3, 7, 11, 5, 9, 3, 7, 4, 8, 12, 16, 2, 4, 2];

    And it compiles successfully but when I try to run it it says Error: out of range

    Can someone help?

  13. #13
    Join Date
    Dec 2007
    Posts
    2,112
    Mentioned
    71 Post(s)
    Quoted
    580 Post(s)

    Default

    Post where you declared Arrayy as a variable

  14. #14
    Join Date
    Oct 2012
    Location
    Porto, Portugal
    Posts
    218
    Mentioned
    0 Post(s)
    Quoted
    42 Post(s)

    Default

    Quote Originally Posted by Kasi View Post
    Post where you declared Arrayy as a variable
    I declared Arrayy like this:
    Simba Code:
    var
    Arayy: Array of TIntegerArray

  15. #15
    Join Date
    Dec 2009
    Posts
    380
    Mentioned
    0 Post(s)
    Quoted
    8 Post(s)

    Default

    Quote Originally Posted by Nirvana View Post
    I declared Arrayy like this:
    Simba Code:
    var
    Arayy: Array of TIntegerArray
    If that's how it is in your script, check the spelling.
    Currently: Playing OSRS legit until I get bored

  16. #16
    Join Date
    Oct 2012
    Location
    Porto, Portugal
    Posts
    218
    Mentioned
    0 Post(s)
    Quoted
    42 Post(s)

    Default

    what do you mean? it is not supposed to be Array of TInteger Array ?

  17. #17
    Join Date
    Dec 2009
    Posts
    380
    Mentioned
    0 Post(s)
    Quoted
    8 Post(s)

    Default

    You are missing an r.

    You have is as arayy. You're defining the array as "arRayy", with 2 r's.
    Currently: Playing OSRS legit until I get bored

  18. #18
    Join Date
    Dec 2007
    Posts
    2,112
    Mentioned
    71 Post(s)
    Quoted
    580 Post(s)

    Default

    Quote Originally Posted by Roflme View Post
    You are missing an r.

    You have is as arayy. You're defining the array as "arRayy", with 2 r's.
    This isn't the reason, even if he posted it this way, if it was a problem with the naming the error would be a "Unknown identifier" error, and im pretty sure he is getting it during runtime. The problem is he's declared the variable without declaring the size, there's 2 ways around this..
    Simba Code:
    SetLength(Arrayy, 4);
    This method is used after declaration. Alternatively he could do it whilst declaring like so..
    Simba Code:
    Var
      Arrayy : Array[0..3] of TIntegerArray;

  19. #19
    Join Date
    Oct 2012
    Location
    Porto, Portugal
    Posts
    218
    Mentioned
    0 Post(s)
    Quoted
    42 Post(s)

    Wink

    Quote Originally Posted by Kasi View Post
    This isn't the reason, even if he posted it this way, if it was a problem with the naming the error would be a "Unknown identifier" error, and im pretty sure he is getting it during runtime. The problem is he's declared the variable without declaring the size, there's 2 ways around this..
    Simba Code:
    SetLength(Arrayy, 4);
    This method is used after declaration. Alternatively he could do it whilst declaring like so..
    Simba Code:
    Var
      Arrayy : Array[0..3] of TIntegerArray;
    Thanks. I actually though that SetLenght was only needed if we didn't give the values to the TIntegers. nvm thanks

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
  •