SRL Archive - OSR Help

Sorry bit more "/


**BANNED The Man

2010-12-24 11:44:17

Hey guys, sorry I feel like a dummy.
I have been playing around with InIntArray etc trying to test for all axes etc.
Well here is what I have, it is a bit all over the place (sorry).

Function AxeWielded : Boolean;
var
Equipped : integer;
TheIDs: TIntegerArray;
Hatchet : TInvItemArray;
Begin
If Not (LoggedIn) Or Not (Players[CurrentPlayer].Active) Then
exit;
TheIDs := [1351, 1357, 1361, 6739, 1348, 1355, 1359, 1353];
GameTab(tab_Inv);
Wait(500 + Random(200));
if(R_ItemIDExistsEx(Hatchet, TheIDs))then
begin
Players[CurrentPlayer].Booleans[0] := False;
Exit;
end else
GameTab(tab_Equip);
Wait(500 + Random(200));
Equipped := GetEquippedIDAt(3);
if(InIntArray(TheIDs, Equipped))then
begin
Players[CurrentPlayer].Booleans[0] := True;
end;
End;
I get a type mismatch on the line shown:
if(R_ItemIDExistsEx(Hatchet, TheIDs))then

Thankyooo for any help
-Boom

Richard

2010-12-24 12:53:34

Try switching the parameters around, it looks like the types are the opposite way around (at they are in my version of reflection)

**BANNED The Man

2010-12-24 13:26:12

From: Richard
Try switching the parameters around, it looks like the types are the opposite way around (at they are in my version of reflection)


Thank you very much kind sir, a stupid mistake on my part… :duh:

-Boom

EDIT:
What is going on with me argh!!!!
IncEx(Players[CurrentPlayer].Integers[0](27 + Integer(not Players[CurrentPlayer].Booleans[0])));
Type Mismatch again … >.<

TomTuff

2010-12-24 13:44:11

you need a comma

IncEx(Players[CurrentPlayer].Integers[0], 27);

**BANNED The Man

2010-12-24 13:48:34

Yep.. another stupid mistake.
TomTuff, do you have msn?

TomTuff

2010-12-24 15:31:27

PM'd