Arrays

Help section from before the user variable changes that broke all macros

Moderator: MacroQuest Developers

User avatar
Fippy
a snow griffon
a snow griffon
Posts: 499
Joined: Tue Jul 16, 2002 10:42 am

Arrays

Post by Fippy » Mon Sep 09, 2002 1:12 pm

I am looking at array's The example script ArrayTest.mac

Code: Select all

| - ArrayTest.mac -

Sub Main
   /for v1 0 to 9
      /varset a(1,$v1) "Sample Quote #$v1"
      /varset a(2,$v1) "Author$v1"
   /next v1
   /varset v2 $rand(10)
   /echo $a(1,$v2) -$a(2,$v2)
/return
shows 2 dimensional arrays. This is fine but what if I want just a 1 dimensional array ??

Also a couple of other questions for Plaz maybe.

Is there a limit on the size a script can be ?
Are we gonna get file access ?

I ask cause Inspired by arantius2's darmpad.mac script I am working on a generic zone farming script and loading the list of mobs, and loot to keep from a file would be kinda useful. so I could do /macro farmzone EK and it will load my EC file with lions and spiders as mobs and quality pelts as loot.

Fippy