From 51dabf2bf460d588f6f7271943119d03bb10c0a8 Mon Sep 17 00:00:00 2001 From: Pragmatic Software Date: Thu, 1 Oct 2020 18:01:05 -0700 Subject: [PATCH] doc/Plugins/Plang.md: Slightly simplify karma example --- doc/Plugins/Plang.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/Plugins/Plang.md b/doc/Plugins/Plang.md index 7b3ad1ac..5e8174af 100644 --- a/doc/Plugins/Plang.md +++ b/doc/Plugins/Plang.md @@ -118,12 +118,12 @@ we'll use PBot's special factoid variable `$arg[0]`. First we add the `++` command. - !factadd ++ /call plang var karma = Integer(factget('#karma-data', '$arg[0]')); karma += 1; factset('#karma-data', '$arg[0]', String(karma)); + !factadd ++ /call plang var karma = Integer(factget('#karma-data', '$arg[0]')); factset('#karma-data', '$arg[0]', String(karma + 1)); ++ added to global channel. Similarly, we add the `--` command. - !factadd -- /call plang var karma = Integer(factget('#karma-data', '$arg[0]')); karma -= 1; factset('#karma-data', '$arg[0]', String(karma)); + !factadd -- /call plang var karma = Integer(factget('#karma-data', '$arg[0]')); factset('#karma-data', '$arg[0]', String(karma - 1)); -- added to global channel. Finally, we add the `karma` command.