SRL Archive - OSR Help

What am I doing wrong?


Sax

2012-11-11 08:02:59


http://prntscr.com/jgw8u

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

riwu

2012-11-11 08:10:16

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 you need a begin.

Sax

2012-11-11 08:15:53

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 you need a begin.


Thanks forgot that

Markus

2012-11-11 10:14:20

You forgot the IntToPoint :)

Kasi

2012-11-11 10:29:59

From: Markus
You forgot the IntToPoint :)


This :P

Sax

2012-11-12 15:17:25

Thanks :)

Sax

2012-11-14 12:20:40

Now, I have another problem… :(

Invalid number of parameters…


http://puu.sh/1q9sU

What is wrong here?

Laimonas171

2012-11-14 12:23:10

From: Nirvana
Now, I have another problem… :(

Invalid number of parameters…


What is wrong here?


Post plain text, between
 
tags. not screen shots! Specially so long, which deforms website style.

Plain text is easier to check, fix, help.

Dynamite

2012-11-14 12:28:31

From: Nirvana
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)

Ashaman88

2012-11-14 12:28:53

mmouse

Sax

2012-11-14 12:42:51

From: Dynamite
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 :duh: im retarded! thanks :)

Sax

2012-11-14 13:47:47

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


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?

Kasi

2012-11-14 16:49:55

Post where you declared Arrayy as a variable

Sax

2012-11-14 17:36:02

From: Kasi
Post where you declared Arrayy as a variable


I declared Arrayy like this:
var
Arayy: Array of TIntegerArray

Roflme

2012-11-14 17:38:36

From: Nirvana
I declared Arrayy like this:
var
Arayy: Array of TIntegerArray


If that's how it is in your script, check the spelling.

Sax

2012-11-14 17:54:30

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

Roflme

2012-11-14 18:01:07

You are missing an r.

You have is as arayy. You're defining the array as "arRayy", with 2 r's.

Kasi

2012-11-14 18:48:57

From: Roflme
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..

SetLength(Arrayy, 4);
This method is used after declaration. Alternatively he could do it whilst declaring like so..

Var
Arrayy : Array[0..3] of TIntegerArray;

Sax

2012-11-15 16:08:00

From: Kasi
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..

SetLength(Arrayy, 4);
This method is used after declaration. Alternatively he could do it whilst declaring like so..

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 ;)