So I found out what caused it; The template specializations. Did I do it wrong? This is how I did them:
If I remove this code, it works again.
static void RegisterArrayTemplateSpecializations(asIScriptEngine* engine)
{
// Int
engine->RegisterObjectType("array<int8>", 0, asOBJ_REF);
engine->RegisterObjectType("array<int16>", 0, asOBJ_REF);
engine->RegisterObjectType("array<int>", 0, asOBJ_REF);
engine->RegisterObjectType("array<int64>", 0, asOBJ_REF);
// UInt
engine->RegisterObjectType("array<uint8>", 0, asOBJ_REF);
engine->RegisterObjectType("array<uint16>", 0, asOBJ_REF);
engine->RegisterObjectType("array<uint>", 0, asOBJ_REF);
engine->RegisterObjectType("array<uint64>", 0, asOBJ_REF);
// String
//engine->RegisterObjectType("array<string>", 0, asOBJ_REF);
// Bool
engine->RegisterObjectType("array<bool>", 0, asOBJ_REF);
// Floating point
engine->RegisterObjectType("array<float>", 0, asOBJ_REF);
engine->RegisterObjectType("array<double>", 0, asOBJ_REF);
// alt:V Entities
engine->RegisterObjectType("array<Player@>", 0, asOBJ_REF);
engine->RegisterObjectType("array<Vehicle@>", 0, asOBJ_REF);
engine->RegisterObjectType("array<Entity@>", 0, asOBJ_REF);
engine->RegisterObjectType("array<VoiceChannel@>", 0, asOBJ_REF);
engine->RegisterObjectType("array<ColShape@>", 0, asOBJ_REF);
engine->RegisterObjectType("array<Checkpoint@>", 0, asOBJ_REF);
engine->RegisterObjectType("array<Blip@>", 0, asOBJ_REF);
}