Brace expansion does not support variables since it is done before variables are expanded. Use seq instead, if you absolutely must:
for i in $(seq 0 ${num})
Or get the array keys directly:
for i in "${!assets[@]}"
(Also, for i in .., not for $i in ...)
Huake Laging got the first error. Once you fix that, this will probably be the next error.