Hey guys,
This probably will just take a second, but I've spent over an hour trouble shooting this JASS compile error. I'm using Anachron's inventory system, and all I want this to do is to disable one of my triggers called "AncientOre" as the item is dropped, then enable it again after Anachron's system completes the drop action.
Have a look:
The error says that AncientOre is an undeclare variable. But it's a real, living breathing trigger in my map.
I spelled it right and everything. And if spelling is not the issue, where am I suppose to declare this variable? I tried every place under the sun.
thanks for looking
This probably will just take a second, but I've spent over an hour trouble shooting this JASS compile error. I'm using Anachron's inventory system, and all I want this to do is to disable one of my triggers called "AncientOre" as the item is dropped, then enable it again after Anachron's system completes the drop action.
Have a look:
JASS:
library CIEvents
endlibrary
module CIEvents
public method pick takes CustomItem ci returns boolean
if .checkPickup(ci) and IsUnitType(.carrier,UNIT_TYPE_STRUCTURE)== false and ( GetItemTypeId(ci.getHandle()) != 'I00G' ) then
call ci.pick(.carrier)
call .addItem(ci)
return true
endif
return false
endmethod
public method drop takes CustomItem ci returns boolean
if .hasItem(ci) then
call DisableTrigger(AncientOre)
call ci.drop(.carrier)
return .remItem(ci)
call EnableTrigger(AncientOre)
endif
return false
endmethod
public method pawn takes CustomItem ci returns boolean
if .hasItem(ci) then
call ci.pawn(.carrier)
return true
endif
return false
endmethod
public method use takes CustomItem ci returns boolean
if .hasItem(ci) then
call ci.use(.carrier)
return true
endif
return false
endmethod
endmodule
The error says that AncientOre is an undeclare variable. But it's a real, living breathing trigger in my map.
I spelled it right and everything. And if spelling is not the issue, where am I suppose to declare this variable? I tried every place under the sun.
thanks for looking