[Ohrrpgce] [ohrrpgce/ohrrpgce] Some plotscripting commands return seemingly valid values when they fail (#1049)

Ralph Versteegen notifications at github.com
Wed Mar 18 01:47:49 PDT 2020


I'm closing this, because there's no specific problem mentioned. The original bug was that `scriptret` wasn't zeroed out, causing garbage return values, and that's fixed.

A lot of commands (fewer than 15 years ago) have poor error checking, but they're not failing, they're doing something, and that's a different problem.

Having given this another decade of thought, I still like the idea of returning "weak types" from a lot of commands: objects that convert implicitly into integers, but can also store extra information like success/failure. Eg
``success(find hero(hero:bob)))``
equivalent to
``find hero(hero: bob) <> -1``
and
``success(npc reference(3, 2))``
equivalent to
``npc reference(3, 2) <> 0``

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/ohrrpgce/ohrrpgce/issues/1049#issuecomment-600496552
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.motherhamster.org/pipermail/ohrrpgce-motherhamster.org/attachments/20200318/1987479d/attachment.html>


More information about the Ohrrpgce mailing list