The results of trying to read array[0] are:
Code:
error {"errortext" := "Array index out of bounds"}
Trying to set it likely returns the same error to the debug log, if enabled. The read error is the same as it would be upon entering any invalid number for the array index. Attempting to write to an as-yet non-existent index on an eScript array just happens to have the special behavior of causing the array to expand, so there isn't really a comparable error for writing to positive index values. Not sure what eScript would do if you used a double type to pass a number larger than the likely 4-byte int limit of array indexes, but that's just going off the deep end
As for gumps, I actually think that it would be been terribly helpful had eScript
started out with 0-based indexes for that, as a practical reason. As it is now, when inserting values into gump arrays, you have to adjust the eScript index into the array by one from the value you set in the gump layout information. That's been my main gripe with eScript arrays.
BUT...... I just happen to think that changing it now would cause even more confusion and trouble.