Hey can anyone check out this script and tell me where it may have gone wrong? I keep getting a syntax error on line 17
Line 17: https.get(weatherURL, (res) => {
Re: Weather alerts to IRC room
By: ansunent to all on Mon Jan 23 2023 12:41 am
The JavaScript engine used by Synchronet (i.e. libmozjs, aka SpiderMonkey, v1.8.5) implements EMCAScript 5 (ES5) and thus does not support JS bullet operators. https://en.wikipedia.org/wiki/ECMAScript_version_history#5th_Edition_%E2%80%9 3_ECMAScript_2009
--
digital man (rob)
Synchronet "Real Fact" #48:
Synchronet directory naming (i.e. ctrl, exec, data) was suggested by S. Deppe Norco, CA WX: 50.9�F, 29.0% humidity, 3 mph NE wind, 0.00 inches rain/24hrs
---
� Synchronet � Vertrauen � Home of Synchronet � [vert/cvs/bbs].synchro.net
Re: Weather alerts to IRC room
By: ansunent to all on Mon Jan 23 2023 12:41 am
The JavaScript engine used by Synchronet (i.e. libmozjs, aka SpiderMonkey, v1.8.5) implements EMCAScript 5 (ES5) and thus does not support JS bullet operators. https://en.wikipedia.org/wiki/ECMAScript_version_history#5th_Ed ition_%E2%80%9 3_ECMAScript_2009
--
digital man (rob)
Synchronet "Real Fact" #48:
Synchronet directory naming (i.e. ctrl, exec, data) was suggested by S. Deppe Norco, CA WX: 50.9¨F, 29.0% humidity, 3 mph NE wind, 0.00 inches rain/24hrs
---
¨ Synchronet ¨ Vertrauen ¨ Home of Synchronet ¨ [vert/cvs/bbs].synchro.net
Still learning so please bear with me. I really appreciate the information.
It sounds like we're specifically saying that the "=>" is the problem or at least one of the syntax problems Am I right?
Re: Weather alerts to IRC room
By: ansunent to Digital Man on Mon Jan 23 2023 06:56 pm
Right. => is often called a rocket operator (or "Arrow function expression") and is not supported in earlier JS implementations. Sorry, not "bullet operator" like I said. https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/A rrow_functions
--
digital man (rob)
This Is Spinal Tap quote #42:
What day the Lord created Spinal Tap and couldn't he have rested on that day? Norco, CA WX: 54.9�F, 29.0% humidity, 4 mph SSE wind, 0.00 inches rain/24hrs
---
� Synchronet � Vertrauen � Home of Synchronet � [vert/cvs/bbs].synchro.net
That makes sense. I'll look into what I need to use in substitution for this "=>".
Hey can anyone check out this script and tell me where it may have
gone wrong? I keep getting a syntax error on line 17
Line 17: https.get(weatherURL, (res) => {
The purpose of the script is to periodically check weather.gov for
new or updated severe weather alerts and to post those in my IRC
room. Below is the whole script. I appreciate any help you can give.
Use ircbot, it has a built in weather function.
Sysop: | Scottrudy |
---|---|
Location: | Fremont, CA |
Users: | 2 |
Nodes: | 10 (0 / 10) |
Uptime: | 41:31:08 |
Calls: | 42 |
Messages: | 23,040 |