简体   繁体   English

TypeError:无法从未定义中读取属性“ range”。 (第2行,“服务器”文件)

[英]TypeError: Cannot read property “range” from undefined. (line 2, file “Server”)

I have a sheet with a load of peoples player IDs that then whitelists people on the server, however im having the problem of when I attempt to run the script (this has worked seemlessly for over a year on my other database (i just made a copy of that database hoping the scripts would still work but they dont) 我有一张载有人物玩家ID的工作表,然后将服务器上的人列入白名单,但是我遇到了问题,当我尝试运行脚本时(这在我的其他数据库上似乎已经工作了一年多(我刚刚做了一个希望脚本仍然可以工作的那个数据库的副本,但它们不起作用)

TypeError: Cannot read property "range" from undefined. TypeError:无法从未定义中读取属性“ range”。 (line 2, file "Server") (第2行,文件“服务器”)

On line 2 for some reason 在第2行由于某种原因

CODE: http://pastebin.com/DMTBA1Sv 代码: http//pastebin.com/DMTBA1Sv

EXAMPLE DATA: I'm not very good with the technical aspect however I do project management and have worked with these scripts for a while but arent working on my copy of database. 示例数据:我在技术方面不是很好,但是我进行项目管理,并且已经使用这些脚本一段时间了,但是没有在我的数据库副本上工作。

Something about the way you are triggering the function has most likely changed. 关于触发功能的方式最有可能发生了变化。 You are passing a parameter 'e' into the function processServerWL when you define the function, but when the function actually runs, there in no 'e' (short for event passed in). 您在定义函数时将参数'e'传递到函数processServerWL中,但是当函数实际运行时,就没有'e'(传递的事件的缩写)。

The error is saying that it can read the property range because 'e' has not be defined. 错误是说它可以读取属性范围,因为尚未定义'e'。 This is a pretty common error when triggers aren't set right, so make sure that is the case. 如果触发器设置不正确,这是一个非常常见的错误,因此请确保确实如此。 Without understanding more about your use context, there isn't any way to tell why the event (e) parameter isn't being passed. 如果不了解您的使用上下文,就无法说明为什么未传递事件(e)参数。 My bet, there is a trigger that needs to be set. 我敢打赌,有一个触发器需要设置。

Here is a link to a more detailed blog post on this error and some ways to fix it: http://www.jeffreyeverhart.com/2016/08/06/fix-typeerror-cannot-read-property-values-undefined/ 这是指向此错误的更详细的博客文章的链接以及修复此错误的一些方法: http : //www.jeffreyeverhart.com/2016/08/06/fix-typeerror-cannot-read-property-values-undefined/

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 TypeError:无法从未定义中读取属性“值”。 (第9行,“代码”文件) - TypeError: Cannot read property “values” from undefined. (line 9, file “Code”) TypeError:无法从未定义中读取属性“ namedValues”。 (第9行,“代码”文件) - TypeError: Cannot read property “namedValues” from undefined. (line 9, file “Code”) “ typeError:无法读取未定义的属性“用户名”。” - “typeError: Cannot read property 'username' of undefined.” 未捕获(承诺中)类型错误:无法读取未定义的属性“0”。 从 csv 文件中提取以填充数组 - Uncaught (in promise) TypeError: Cannot read property '0' of undefined. Pulling from a csv file to populate an array 当尝试在谷歌工作表脚本中使用 e.value 时,我得到 TypeError: Cannot read property "Values" from undefined。 (第 7 行,文件“代码”) - when attempting to use e.value in google sheet script I get TypeError: Cannot read property "Values" from undefined. (line 7, file "Code") TypeError:无法读取未定义的属性“ get”。 是npm的问题吗? - TypeError: Cannot read property 'get' of undefined. Is npm the issue? TypeError:无法读取未定义的属性“ 0”。 React Redux应用 - TypeError: Cannot read property '0' of undefined. React Redux App 未处理的拒绝(TypeError):无法读取未定义的属性“扩展”。 (GraphQL) - Unhandled Rejection (TypeError): Cannot read property 'extensions' of undefined. (GraphQL) × TypeError:无法读取未定义的属性“地图”。 发现错误 - × TypeError: Cannot read property 'map' of undefined. found error TypeError:无法读取未定义的属性“地图”。 反应 - TypeError: Cannot read property 'map' of undefined. React
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM