initState()
The initState() method initializes the state variables of a UDA to a known state. If it is not called, all UDA state variables are automatically initialized to NULL.
Pass a table containing the initial values of the state variables to the initState() method. The initState() method returns the updated values.
Example
function initState(state)
state[1] = 0
state[2] = 0
return state
end