From e694bc14f95f5f7e9e00455d5aa3785e11c87c6f Mon Sep 17 00:00:00 2001 From: Wifinigel <84858080+nigelbowden@users.noreply.github.com> Date: Mon, 29 May 2023 07:47:33 +0100 Subject: [PATCH] Update for v1.03 --- scripts/v6/ch6-12-global-vars3.rsc | 2 +- scripts/v6/ch7-01-basic-if.rsc | 2 +- scripts/v6/ch7-03-if-else.rsc | 2 +- scripts/v6/ch7-04-if-else-vars.rsc | 2 +- scripts/v6/ch7-05-if-else-vars2.rsc | 2 +- scripts/v6/ch7-06-if-multiple-conditions.rsc | 2 +- scripts/v6/ch7-07-nested-if-statements.rsc | 2 +- scripts/v6/ch7-08-if-else-binary.rsc | 2 +- scripts/v6/ch7-09-if-binary-simplified.rsc | 2 +- scripts/v6/ch8-06-while-infinite.rsc | 2 +- scripts/v6/ch8-07-while-with-exit.rsc | 2 +- scripts/v7/ch6-12-global-vars3.rsc | 2 +- scripts/v7/ch7-01-basic-if.rsc | 2 +- scripts/v7/ch7-03-if-else.rsc | 2 +- scripts/v7/ch7-04-if-else-vars.rsc | 2 +- scripts/v7/ch7-05-if-else-vars2.rsc | 2 +- scripts/v7/ch7-06-if-multiple-conditions.rsc | 2 +- scripts/v7/ch7-07-nested-if-statements.rsc | 2 +- scripts/v7/ch7-08-if-else-binary.rsc | 2 +- scripts/v7/ch7-09-if-binary-simplified.rsc | 2 +- scripts/v7/ch8-06-while-infinite.rsc | 2 +- scripts/v7/ch8-07-while-with-exit.rsc | 2 +- 22 files changed, 22 insertions(+), 22 deletions(-) diff --git a/scripts/v6/ch6-12-global-vars3.rsc b/scripts/v6/ch6-12-global-vars3.rsc index a64ad47..9aee72e 100644 --- a/scripts/v6/ch6-12-global-vars3.rsc +++ b/scripts/v6/ch6-12-global-vars3.rsc @@ -25,7 +25,7 @@ if ( [:typeof $WanInterfaces] != "array") do={ :local InterfaceId [/interface ethernet find name=$WanInterface]; :local UpDown "down"; - if ([:interface ethernet get $InterfaceId]->"running") do={ + if ([/interface ethernet get $InterfaceId]->"running") do={ :set UpDown "up" } diff --git a/scripts/v6/ch7-01-basic-if.rsc b/scripts/v6/ch7-01-basic-if.rsc index afa02ec..61ce502 100644 --- a/scripts/v6/ch7-01-basic-if.rsc +++ b/scripts/v6/ch7-01-basic-if.rsc @@ -4,7 +4,7 @@ :put "Hello, I hope you're well."; # Check if the time is after 6pm (get time in 21:46:04 format) -:local CurrentTime [:system clock get time]; +:local CurrentTime [/system clock get time]; :put "The current time is : $CurrentTime"; # Say good evening if time is after 18:00 diff --git a/scripts/v6/ch7-03-if-else.rsc b/scripts/v6/ch7-03-if-else.rsc index 653b360..61383fc 100644 --- a/scripts/v6/ch7-03-if-else.rsc +++ b/scripts/v6/ch7-03-if-else.rsc @@ -4,7 +4,7 @@ :put "Hello, I hope you're well."; # Check if the time is after 6pm (get time in 21:46:04 format) -:local CurrentTime [:system clock get time]; +:local CurrentTime [/system clock get time]; :put "The current time is : $CurrentTime"; # Say good morning if time is before 12:00 diff --git a/scripts/v6/ch7-04-if-else-vars.rsc b/scripts/v6/ch7-04-if-else-vars.rsc index 849c5b0..adbf44c 100644 --- a/scripts/v6/ch7-04-if-else-vars.rsc +++ b/scripts/v6/ch7-04-if-else-vars.rsc @@ -1,7 +1,7 @@ # filename: ch7-04-if-else-vars.rsc # Get the current time -:local CurrentTime [:system clock get time]; +:local CurrentTime [/system clock get time]; :put "The current time is : $CurrentTime"; # Check if it's after noon diff --git a/scripts/v6/ch7-05-if-else-vars2.rsc b/scripts/v6/ch7-05-if-else-vars2.rsc index 9a2dd3a..62b5ef1 100644 --- a/scripts/v6/ch7-05-if-else-vars2.rsc +++ b/scripts/v6/ch7-05-if-else-vars2.rsc @@ -1,7 +1,7 @@ # filename: ch7-05-if-else-vars2.rsc # Get the current time -:local CurrentTime [:system clock get time]; +:local CurrentTime [/system clock get time]; :put "The current time is : $CurrentTime"; # declare the time of day variable diff --git a/scripts/v6/ch7-06-if-multiple-conditions.rsc b/scripts/v6/ch7-06-if-multiple-conditions.rsc index 9722d04..ddb7749 100644 --- a/scripts/v6/ch7-06-if-multiple-conditions.rsc +++ b/scripts/v6/ch7-06-if-multiple-conditions.rsc @@ -1,7 +1,7 @@ # filename: ch7-06-multiple-conditions.rsc # Get the current time -:local CurrentTime [:system clock get time]; +:local CurrentTime [/system clock get time]; :put "The current time is : $CurrentTime"; # declare the time of day variable diff --git a/scripts/v6/ch7-07-nested-if-statements.rsc b/scripts/v6/ch7-07-nested-if-statements.rsc index b060e96..1409048 100644 --- a/scripts/v6/ch7-07-nested-if-statements.rsc +++ b/scripts/v6/ch7-07-nested-if-statements.rsc @@ -1,7 +1,7 @@ # filename: ch7-07-nested-if-statements.rsc # Get the current time -:local CurrentTime [:system clock get time]; +:local CurrentTime [/system clock get time]; :put "The current time is : $CurrentTime"; # declare the time of day variable diff --git a/scripts/v6/ch7-08-if-else-binary.rsc b/scripts/v6/ch7-08-if-else-binary.rsc index 1200784..4928234 100644 --- a/scripts/v6/ch7-08-if-else-binary.rsc +++ b/scripts/v6/ch7-08-if-else-binary.rsc @@ -8,7 +8,7 @@ :local UpDown; -if ([:interface ethernet get $InterfaceId]->"running") do={ +if ([/interface ethernet get $InterfaceId]->"running") do={ :set UpDown "up"; } else={ :set UpDown "down"; diff --git a/scripts/v6/ch7-09-if-binary-simplified.rsc b/scripts/v6/ch7-09-if-binary-simplified.rsc index 3a04bc1..51507bf 100644 --- a/scripts/v6/ch7-09-if-binary-simplified.rsc +++ b/scripts/v6/ch7-09-if-binary-simplified.rsc @@ -7,7 +7,7 @@ :local InterfaceId [/interface ethernet find name=$WanInterfaceName]; :local UpDown "down"; -if ([:interface ethernet get $InterfaceId]->"running") do={ +if ([/interface ethernet get $InterfaceId]->"running") do={ :set UpDown "up" } diff --git a/scripts/v6/ch8-06-while-infinite.rsc b/scripts/v6/ch8-06-while-infinite.rsc index f52fecd..e5a79fe 100644 --- a/scripts/v6/ch8-06-while-infinite.rsc +++ b/scripts/v6/ch8-06-while-infinite.rsc @@ -13,7 +13,7 @@ :set LoopCounter ($LoopCounter - 1); # add in a pause to prevent cpu thrashing - delay 1; + :delay 1; } # print a message when/if the loop exits diff --git a/scripts/v6/ch8-07-while-with-exit.rsc b/scripts/v6/ch8-07-while-with-exit.rsc index 9423799..1ac0bad 100644 --- a/scripts/v6/ch8-07-while-with-exit.rsc +++ b/scripts/v6/ch8-07-while-with-exit.rsc @@ -1,4 +1,4 @@ -# filename: ch8-06-while-with-exit.rsc +# filename: ch8-07-while-with-exit.rsc # Let's create a loop using "while" diff --git a/scripts/v7/ch6-12-global-vars3.rsc b/scripts/v7/ch6-12-global-vars3.rsc index cd5bef0..9eaef93 100644 --- a/scripts/v7/ch6-12-global-vars3.rsc +++ b/scripts/v7/ch6-12-global-vars3.rsc @@ -25,7 +25,7 @@ if ( [:typeof $WanInterfaces] != "array") do={ :local InterfaceId [/interface/ethernet find name=$WanInterface]; :local UpDown "down"; - if ([:interface/ethernet get $InterfaceId]->"running") do={ + if ([/interface/ethernet get $InterfaceId]->"running") do={ :set UpDown "up" } diff --git a/scripts/v7/ch7-01-basic-if.rsc b/scripts/v7/ch7-01-basic-if.rsc index afa02ec..61ce502 100644 --- a/scripts/v7/ch7-01-basic-if.rsc +++ b/scripts/v7/ch7-01-basic-if.rsc @@ -4,7 +4,7 @@ :put "Hello, I hope you're well."; # Check if the time is after 6pm (get time in 21:46:04 format) -:local CurrentTime [:system clock get time]; +:local CurrentTime [/system clock get time]; :put "The current time is : $CurrentTime"; # Say good evening if time is after 18:00 diff --git a/scripts/v7/ch7-03-if-else.rsc b/scripts/v7/ch7-03-if-else.rsc index 653b360..61383fc 100644 --- a/scripts/v7/ch7-03-if-else.rsc +++ b/scripts/v7/ch7-03-if-else.rsc @@ -4,7 +4,7 @@ :put "Hello, I hope you're well."; # Check if the time is after 6pm (get time in 21:46:04 format) -:local CurrentTime [:system clock get time]; +:local CurrentTime [/system clock get time]; :put "The current time is : $CurrentTime"; # Say good morning if time is before 12:00 diff --git a/scripts/v7/ch7-04-if-else-vars.rsc b/scripts/v7/ch7-04-if-else-vars.rsc index 849c5b0..adbf44c 100644 --- a/scripts/v7/ch7-04-if-else-vars.rsc +++ b/scripts/v7/ch7-04-if-else-vars.rsc @@ -1,7 +1,7 @@ # filename: ch7-04-if-else-vars.rsc # Get the current time -:local CurrentTime [:system clock get time]; +:local CurrentTime [/system clock get time]; :put "The current time is : $CurrentTime"; # Check if it's after noon diff --git a/scripts/v7/ch7-05-if-else-vars2.rsc b/scripts/v7/ch7-05-if-else-vars2.rsc index 9a2dd3a..62b5ef1 100644 --- a/scripts/v7/ch7-05-if-else-vars2.rsc +++ b/scripts/v7/ch7-05-if-else-vars2.rsc @@ -1,7 +1,7 @@ # filename: ch7-05-if-else-vars2.rsc # Get the current time -:local CurrentTime [:system clock get time]; +:local CurrentTime [/system clock get time]; :put "The current time is : $CurrentTime"; # declare the time of day variable diff --git a/scripts/v7/ch7-06-if-multiple-conditions.rsc b/scripts/v7/ch7-06-if-multiple-conditions.rsc index 9722d04..ddb7749 100644 --- a/scripts/v7/ch7-06-if-multiple-conditions.rsc +++ b/scripts/v7/ch7-06-if-multiple-conditions.rsc @@ -1,7 +1,7 @@ # filename: ch7-06-multiple-conditions.rsc # Get the current time -:local CurrentTime [:system clock get time]; +:local CurrentTime [/system clock get time]; :put "The current time is : $CurrentTime"; # declare the time of day variable diff --git a/scripts/v7/ch7-07-nested-if-statements.rsc b/scripts/v7/ch7-07-nested-if-statements.rsc index b060e96..1409048 100644 --- a/scripts/v7/ch7-07-nested-if-statements.rsc +++ b/scripts/v7/ch7-07-nested-if-statements.rsc @@ -1,7 +1,7 @@ # filename: ch7-07-nested-if-statements.rsc # Get the current time -:local CurrentTime [:system clock get time]; +:local CurrentTime [/system clock get time]; :put "The current time is : $CurrentTime"; # declare the time of day variable diff --git a/scripts/v7/ch7-08-if-else-binary.rsc b/scripts/v7/ch7-08-if-else-binary.rsc index a01e55e..047836c 100644 --- a/scripts/v7/ch7-08-if-else-binary.rsc +++ b/scripts/v7/ch7-08-if-else-binary.rsc @@ -8,7 +8,7 @@ :local UpDown; -if ([:interface ethernet get $InterfaceId]->"running") do={ +if ([/interface ethernet get $InterfaceId]->"running") do={ :set UpDown "up"; } else={ :set UpDown "down"; diff --git a/scripts/v7/ch7-09-if-binary-simplified.rsc b/scripts/v7/ch7-09-if-binary-simplified.rsc index fb8dbaa..3a60585 100644 --- a/scripts/v7/ch7-09-if-binary-simplified.rsc +++ b/scripts/v7/ch7-09-if-binary-simplified.rsc @@ -7,7 +7,7 @@ :local InterfaceId [/interface/ethernet find name=$WanInterfaceName]; :local UpDown "down"; -if ([:interface/ethernet get $InterfaceId]->"running") do={ +if ([/interface/ethernet get $InterfaceId]->"running") do={ :set UpDown "up" } diff --git a/scripts/v7/ch8-06-while-infinite.rsc b/scripts/v7/ch8-06-while-infinite.rsc index f52fecd..e5a79fe 100644 --- a/scripts/v7/ch8-06-while-infinite.rsc +++ b/scripts/v7/ch8-06-while-infinite.rsc @@ -13,7 +13,7 @@ :set LoopCounter ($LoopCounter - 1); # add in a pause to prevent cpu thrashing - delay 1; + :delay 1; } # print a message when/if the loop exits diff --git a/scripts/v7/ch8-07-while-with-exit.rsc b/scripts/v7/ch8-07-while-with-exit.rsc index 9423799..1ac0bad 100644 --- a/scripts/v7/ch8-07-while-with-exit.rsc +++ b/scripts/v7/ch8-07-while-with-exit.rsc @@ -1,4 +1,4 @@ -# filename: ch8-06-while-with-exit.rsc +# filename: ch8-07-while-with-exit.rsc # Let's create a loop using "while"