summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2020-12-09 12:48:13 -0300
committerJesusaves <cpntb1@ymail.com>2020-12-09 12:48:13 -0300
commit8153fe37528174a31c0669ee8fb3ab978ab5909f (patch)
tree5477ce4de913ccf9a6e1b1143b70685b99d411a4
parent4262b7c7963a933a31a6fc35331e998d1bd0c8e7 (diff)
downloadserverdata-hocus/deprecate_lg.tar.gz
serverdata-hocus/deprecate_lg.tar.bz2
serverdata-hocus/deprecate_lg.tar.xz
serverdata-hocus/deprecate_lg.zip
[skip ci] While we are at it, deprecate g() and raise an error.hocus/deprecate_lg
Show a random value, but as the proper function is any(), it is an unexpected behavior, therefore faulty, therefore, an error. (instead of a warning)
-rw-r--r--npc/functions/main.txt4
1 files changed, 2 insertions, 2 deletions
diff --git a/npc/functions/main.txt b/npc/functions/main.txt
index 28b61c7c..8029f3eb 100644
--- a/npc/functions/main.txt
+++ b/npc/functions/main.txt
@@ -54,8 +54,8 @@ function script mesq {
}
function script g {
- // TODO: remove gendered lines from NPCs, or use any(getarg(0), getarg(1)) to make it random
- return BodyType == 0 ? getarg(0) : getarg(1);
+ consolemes(CONSOLEMES_ERROR, "Deprecated function \"g\" used, results are not reliable.");
+ return rand(1000) % 2 ? getarg(0) : getarg(1);
}
function script b {