Bixby Sayz
2011-09-07 20:20:43
Having trouble passing a list of integers into R_GetNpcsMulti.
Consider this code:
Which means I have to replace all my TIntegerArrays with TVariantArrays? Say it ain't so!
Consider this code:
program new;
{$i srl\srl\misc\smart.scar}
{$i srl\srl.scar}
{$i reflection\reflection.simba}
var
SomeIntegerArray: TIntegerArray;
SomeVariantArray: TVariantArray;
begin
Smart_Server := 1;
ClearDebug;
SetupReflection;
// This is valid...
R_GetNPCsMulti([0, 1, 2], FALSE);
// As is this...
SomeVariantArray := [0, 1, 2];
R_GetNPCsMulti(SomeVariantArray, FALSE);
// But this is not...
SomeIntegerArray := [0, 1, 2];
R_GetNPCsMulti(SomeIntegerArray, FALSE);
// Nor is this...
SomeIntegerArray := [0, 1, 2];
SomeVariantArray := SomeIntegerArray;
R_GetNPCsMulti(SomeVariantArray, FALSE);
end.It generates the error:Error: Type Mismatch at line 25
The following DTMs were not freed: [SRL - Lamp bitmap, 1]
The following bitmaps were not freed: [SRL - Mod bitmap, SRL - Admin bitmap]
Which means I have to replace all my TIntegerArrays with TVariantArrays? Say it ain't so!