Difference between revisions of "CopyArray"
Jump to navigation
Jump to search
updated syntax
imported>Haama (Added DupArray) |
imported>Speedo (updated syntax) |
||
Line 4: | Line 4: | ||
'''Syntax:''' | '''Syntax:''' | ||
(ArrayID:long) CopyArray ArrayID:long ''Size:long'' | (ArrayID:long) CopyArray ArrayID:long ''Size:long RefuseZero:short'' | ||
(ArrayID:long) DupArray ArrayID:long ''Size:long'' | (ArrayID:long) DupArray ArrayID:long ''Size:long RefuseZero:short'' | ||
Creates a copy of an array and returns the newly created ArrayID. | Creates a copy of an array and returns the newly created ArrayID. | ||
Line 12: | Line 12: | ||
*If you want to modify an array from another mod, you will need to set the Global flag to 1. If Global is 0 or unset the function will fail. If the array is protected the function will fail. | *If you want to modify an array from another mod, you will need to set the Global flag to 1. If Global is 0 or unset the function will fail. If the array is protected the function will fail. | ||
*If the array does not exist, it returns -1. | *If the array does not exist, it returns -1. | ||
*If ''RefuseZero'' is 1, then the new Array's ID will never be zero. | |||
==Notes== | ==Notes== |