Im getting an error:
This is the code:
This is the error:InvMouse(1, Rightclick);
Unknown identifier 'Rightclick'

You mean something like this? It's from Inventory.scar.SCAR Code:{*******************************************************************************
procedure InvMouse(InvSlot, Action: Byte);
By: EvilChicken!
Description: A combined MouseItem & MMouseItem, will hopefully replace both
procedures one day. Usage is like SRL's MouseBox, Action determines what to do:
1: Leftclick
2: Rightclick
3: Move mouse to item
*******************************************************************************}
Hmm...Perhaps Action would be easier as a Variant instead of a Byte?
<3
Originally Posted by Eminem

Here it is:
SCAR Code:{*******************************************************************************
procedure InvMouse(InvSlot, Action: Byte);
By: EvilChicken! - modified by R1ch
Description: A combined MouseItem & MMouseItem, will hopefully replace both
procedures one day. Usage is like SRL's MouseBox, Action determines what to do:
1, 'left', 'lc' - Leftclick
2, 'right', 'rc' - Rightclick
3, 'move', 'nothing' - Move mouse to item
*******************************************************************************}
procedure InvMouse(InvSlot, Action : Variant);
var
TB : TBox;
A : Integer;
begin
if (not InRange(InvSlot, 1, 28)) then
begin
srl_Warn('InvMouse', 'Inventory slot #' + IntToStr(InvSlot) + ' is not a valid slot', warn_AllVersions);
Exit;
end;
if not Action = 1 or Action = 2 or Action = 3 then
begin
case LowerCase(Action) of
'left', 'lc' : A:= 1;
'right', 'rc' : A:= 2;
'move', 'nothing' : A:=3;
end else
begin
srl_Warn('InvMouse', 'Action #' + Action + ' is not a valid action', warn_AllVersions);
Exit;
end;
end else
A:= Action;
if (not InRange(Action, 1, 3)) then
begin
srl_Warn('InvMouse', 'Action #' + IntToStr(Action) + ' is not a valid action', warn_AllVersions);
Exit;
end;
GameTab(tab_inv);
TB := InvBox(InvSlot);
MouseBox(TB.X1, TB.Y1, TB.X2, TB.Y2, Action);
end;
Some of the ways I do things may seem unorthodox, but it's for a reason.
<3
Originally Posted by Eminem
There are currently 1 users browsing this thread. (0 members and 1 guests)