Bixby Sayz
2011-10-14 19:07:56
This is a new setup on a new machine, so I can't help but wonder if it is just my setup, or this is a legit error?
Running this script I get an access violation when calling R_GetAllNPCs.
Actually the error is in R_GetNPCActionArray.
Running this script I get an access violation when calling R_GetAllNPCs.
program new;
{$i srl\srl\misc\smart.scar}
{$i srl\srl.scar}
{$i reflection\reflection.simba}
var
Npcs: TNPCArray;
HiNpcs: integer;
I: integer;
begin
ClearDebug;
ClearReport;
Smart_Server := 152;
Smart_Members := FALSE;
Smart_Signed := TRUE;
Smart_SuperDetail := FALSE;
SetupReflection;
if not R_LoggedIn then
begin
writeln('Not logged in.');
exit;
end;
Npcs := R_GetAllNPCs(FALSE);
HiNpcs := High(Npcs);
writeln(Format('%d npcs found.', [(HiNpcs +1)]));
if (HiNpcs < 0) then
exit;
for I := 0 to HiNpcs do
writeln(Format('Npc id %d (%s) at tile (%d,%d). Distance: %d.', [Npcs[I].Tile.X, Npcs[I].Tile.Y, Npcs[I].Name, R_DistanceFromTile(Npcs[I].Tile)]));
end.SRL Compiled in 10 msec
SMART Initialized.
Loaded: Server 152, Members: False, Signed: True, Super Detail: False.
Reflection Compiled in 731 msec
Error: Exception: Access violation at line 87
The following DTMs were not freed: [SRL - Lamp bitmap, 1]
The following bitmaps were not freed: [SRL - Mod bitmap, SRL - Admin bitmap]
Actually the error is in R_GetNPCActionArray.
temp := SmartGetFieldArrayString(NPCDef, hook_npcdef_Actions, i);