From e96ea634793912fee83d80d4cd4c5db3fa871ebf Mon Sep 17 00:00:00 2001 From: suchmememanyskill Date: Sat, 16 Oct 2021 12:41:08 +0200 Subject: [PATCH] add .len to unsolved array --- source/script/unsolvedArrayClass.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/source/script/unsolvedArrayClass.c b/source/script/unsolvedArrayClass.c index a328c03..9c8a3e0 100644 --- a/source/script/unsolvedArrayClass.c +++ b/source/script/unsolvedArrayClass.c @@ -152,7 +152,12 @@ Variable_t createUnsolvedArrayVariable(Function_t* f) { return var; } +ClassFunction(retZero){ + return newIntVariablePtr(0); +} + u8 anotherOneVarArg[] = { VARARGCOUNT }; +u8 unsolvedArrayStr[] = { StringClass }; ClassFunction(createTypedArray) { Vector_t v = { 0 }; @@ -180,6 +185,7 @@ ClassFunction(createTypedArray) { ClassFunctionTableEntry_t unsolvedArrayFunctions[] = { {"+", createTypedArray, 1, anotherOneVarArg}, {"add", createTypedArray, 1, anotherOneVarArg}, + {"len", retZero, 0, 0}, }; Variable_t getUnsolvedArrayMember(Variable_t* var, char* memberName) {