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: | digital man |
---|---|
Location: | Riverside County, California |
Users: | 1,043 |
Nodes: | 15 (0 / 15) |
Uptime: | 41:16:58 |
Calls: | 500,899 |
Calls today: | 2 |
Files: | 109,370 |
D/L today: |
4,661 files (475M bytes) |
Messages: | 304,218 |