首页 > 解决方案 > 这个错误是什么意思?- '尝试对未 DIM 的变量进行数组操作。'

问题描述

在解析一些 JSON 时,我遇到了这个错误。body是一个关联数组。调试器停在这一行。

itemTitle = body["title"]

整个错误信息是

Array operation attempted on variable not DIM'd. (runtime error &he7) in $LIVECOMPILE(4)

标签: rokubrightscript

解决方案


当您尝试对字符串使用数组访问器时,就会发生这种情况。例如,

str1 = "hello"
title = str1["title"] ' error - Array operation attempted on variable not DIM'd.

推荐阅读