Utils array error

I have an array creating stat mods based on the stats instead of creating them individually. I just updated CSIDE and I’m getting two errors. One is when I run a quicktest, saying: “Error: utils line 6: Not a number: “

The other error is saying that the mods variables don’t exist when I try to play through to test the code. Any help would be very much appreciated!

This is line 6:

*set { stats[i_]&“mod” } round((({stats[i_]}-10)/2)-0.5)

And this is the whole code for utils.

*comment @utils.txt – dnd mods loop
*label update_mods
*temp i_ 1
*label mods_loop
*comment
*set { stats[i_]&“mod” } round((({stats[i_]}-10)/2)-0.5)
*line_break
${stats[i_]}: ${{stats[i_]&” mod"}}
*comment
*set i_ +1
*if (i_ <= stats_length)
*goto mods_loop
*return

____

I fixed the second issue but still get the error about line 6 not being a number.

Shouldn’t it be stats[i_]?

It is. I think formatting made it disappear.

I fixed the issue. It seems I had set the stats as string variables and not numerical.