HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

How do i do this in custom text >>>

12-31-2002, 01:20 PM#1
spekkio
how can i make a function that accepts an array of any type?

i tried
function NEWfunc takes string array names returns nothing
//my code here
endfunction

always gives me an error... can somebody tell the way to do it?
12-31-2002, 03:59 PM#2
DKSlayer
You can't have a function return or take a an array of something. It can take a integer from an array ie.
Code:
function Test takes Cool Integer returns integer
  local integer array Hmmm

  set Hmmm[0] = Cool + 2
  return Hmmm[0]
endfunction

function main takes nothing returns nothing
  local integer Eat
  local integer array Best

  set Best[0] = 3
  Eat = Test(Best[0])
endfunction

Also look at my Parser, I cheated to get everything out of an array in it.
http://www.wc3campaigns.com/forums/s...ighlight=array

Hope this helps.
DKSlayer
01-01-2003, 01:40 AM#3
spekkio
i just figured out another way by using global arrays so, thanks anyways... :)