summaryrefslogtreecommitdiff
path: root/npc
diff options
context:
space:
mode:
Diffstat (limited to 'npc')
-rw-r--r--npc/custom/test.txt14
1 files changed, 14 insertions, 0 deletions
diff --git a/npc/custom/test.txt b/npc/custom/test.txt
index bfd297f5d..0fffecf73 100644
--- a/npc/custom/test.txt
+++ b/npc/custom/test.txt
@@ -19,6 +19,15 @@ OnCheck:
//end;
}
return;
+OnCheckStr:
+ .@msg$ = getarg(0,"Unknown Error");
+ .@val$ = getarg(1,"");
+ .@ref$ = getarg(2,"");
+ if (.@val$ != .@ref$) {
+ debugmes "Error: "+.@msg$+": '"+.@val$+"' != '"+.@ref$+"'";
+ //end;
+ }
+ return;
OnInit:
// Array subscript
setarray .@a, 3, 2, 1;
@@ -226,6 +235,11 @@ OnInit:
callsub(OnCheck, "Order of <,>,==", .@y);
+ .@x$ = "string "
+ "concatenation" /* test */ " succeeded";
+ callsub(OnCheckStr, "String concatenation", .@x$, "string concatenation succeeded");
+
+
// Bitwise & operator
.@x = (7&4); // 0111 & 0100 --> 0100
.@y = (4&1); // 0100 & 0001 --> 0000