Problem with toItemScript

Okay the syntax looks alright because in the UI it now looks like this:

Yet, the item still shows UNDEF:

If I remove the stateDescription part then it correctly shows the m/s value.