SRL Archive - OSR Help

Initializing Array Error


chaoyd

2010-05-20 05:31:34

My Script Compiles Correctly, but when I go to run it I get this Procedure Call(I assume) error:
[Runtime Error] : Could not call proc in line 26 in script *:\*\*\*\AddyMiner.scar

My Line 26 is

WorldsToHopTo:=[10,11,13,14,16,19,20,25,29,30,33,34,35,37];

The only other time this is used is when I initially declare WorldsToHopTo (It doesn't let me declare + initialize at the same time) This line is
  WorldsToHopTo: array[0..13] of integer;
But Basically I'm wondering if there's a way to just Declare and Initialize everything at once.

I tried googling around, but I kept getting "semicolon" "colon" and "=" signs needed in weird places. Thanks for any help :)

Bonfield

2010-05-20 05:39:41

Could you post the script please?

nielsie95

2010-05-20 05:42:11

Try declaring the array as a dynamic array (no range).

chaoyd

2010-05-20 05:53:35

^ Thank You Nielsie that worked <3 :D. Why does it work when it's dynamic and not static (just curious)?

EDIT:

Also, is there a way to declare + initialize the Array, or Am I stuck using two lines?

i luffs yeww

2010-05-20 19:05:02

As of right now, it has to be done in two lines.