简体   繁体   中英

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)

TypeError: Cannot read property "range" from undefined. (line 2, file "Server")

On line 2 for some reason

CODE: 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).

The error is saying that it can read the property range because 'e' has not be defined. 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. 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/

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM