roku - 这个错误是什么意思?- '尝试对未 DIM 的变量进行数组操作。'
问题描述
在解析一些 JSON 时,我遇到了这个错误。body
是一个关联数组。调试器停在这一行。
itemTitle = body["title"]
整个错误信息是
Array operation attempted on variable not DIM'd. (runtime error &he7) in $LIVECOMPILE(4)
解决方案
当您尝试对字符串使用数组访问器时,就会发生这种情况。例如,
str1 = "hello"
title = str1["title"] ' error - Array operation attempted on variable not DIM'd.
推荐阅读
- python - Django 的 ListView - 如何自定义它
- python - 我正在尝试在 python 中使用替换功能,但遇到了一些问题
- mysql - Laravel不保存十进制数字
- java - 如何从 Mock-Server 返回响应并将其保存到变量中?
- python - 将 JSON 结果保存到 CSV
- r - 循环具有三个参数的函数,mapply/sapply/for 循环不起作用?
- proxy - Postman 与 JMeter 的集成
- java - Java:使用流连接具有 2 个不同分隔符的 2D 字符串 [] [] 数组
- css - 如何从 Material-UI 的轮廓文本字段中模仿轮廓和标签的外观?
- php - Laravel 在一个查询中进行不同的选择