add string array indexing

This commit is contained in:
suchmememanyskill
2021-07-13 15:53:49 +02:00
parent 8c6e70b63d
commit 3c640e23b1
2 changed files with 18 additions and 3 deletions

View File

@@ -208,7 +208,6 @@ Variable_t getGenericFunctionMember(Variable_t* var, char* memberName, ClassFunc
}
}
printScriptError(SCRIPT_FATAL, "Could not find member of class");
return (Variable_t){ 0 };
}
@@ -216,8 +215,9 @@ Variable_t* callMemberFunction(Variable_t* var, char* memberName, CallArgs_t* ar
for (u32 i = 0; i < ARRAY_SIZE(memberGetters); i++) {
if (var->variableType == memberGetters[i].classType) {
Variable_t funcRef = memberGetters[i].func(var, memberName);
if (funcRef.variableType == None)
return NULL;
if (funcRef.variableType == None) {
SCRIPT_FATAL_ERR("Did not find member '%s'", memberName);
}
Variable_t* ptr = &funcRef;
if (funcRef.variableType == ReferenceType) {