So again i have a problem and im asking for help. I get an error message thats says
Code:
[Error] (45:48): Internal error (20) at line 44
Compiling failed.
And the function is
Simba Code:
Function FindFight(MonsterName:string):Boolean;
Var
AllNPCs,RightNPC :TNPCArray;
TheMonster :MonsterData;
I,a :Integer;
PointI:TPoint;
Begin
AllNPCs := R_GetAllNPCs(False);
TheMonster := WhatMonsterData(MonsterName);
For I := High(AllNPCs) Downto 0 Do
If (AllNPCs[I].ID = TheMonster.ID) Then
RightNPC[(High(RightNPC)+1)] = AllNPCs[I];
For I := High(RightNPC) Downto 0 Do
R_SortNPCs(RightNPC);
For I := 0 To High(RightNPC) Do
If RightNPC[I].InCombat Then
If R_TileOnMM(RightNPC[I]) Then
Begin
PointI := R_TileToMM(RightNPC[I]);
MMouse(PointI.x,PointI.y,4,4);
If WaitUptext(TheMonster.Name,2000) Then
Begin
GetMousePos(x,y);
If Random(20) = 5 Then
Begin
Mouse(x,y,0,0,False);
If WaitOption('Attack',2000) Then
Begin
Result := True
Exit;
End;
End Else Begin
Mouse(x,y,0,0,True);
Result := true;
Exit;
End;
End;
End;
End;
Thanks for any help, i hope to finish atleast one script by the end of summer im getting really annoyed at not even finishing my first script.
Thanks