Im using DGUI to make a bag system interface but I can't seem to find the right function. Here's a link to DGUI:http://www.wc3c.net/showthread.php?t=102351
Here's my code:
Jass:
scope BagSystem initializer Init
function GetAbility takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'AUan' ) ) then
return false
endif
return true
endfunction
function BagSystemInterface takes nothing returns nothing
local real minx = 50
local real maxy = 50
local real W = 100
local real H = 100
local real z = 100
local real texture = 'ATtc'
call New(minx, maxy, W, H, z, texture)
endfunction
//===========================================================================
function Init takes nothing returns nothing
local trigger t = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( t, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( t, Condition( function GetAbility ) )
call TriggerAddAction( t, function BagSystemInterface )
endfunction
endscope
The problem is that the function New causes a error saying Undeclared variable New.
Here's my code:
Jass:
scope BagSystem initializer Init
function GetAbility takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'AUan' ) ) then
return false
endif
return true
endfunction
function BagSystemInterface takes nothing returns nothing
local real minx = 50
local real maxy = 50
local real W = 100
local real H = 100
local real z = 100
local real texture = 'ATtc'
call New(minx, maxy, W, H, z, texture)
endfunction
//===========================================================================
function Init takes nothing returns nothing
local trigger t = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( t, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( t, Condition( function GetAbility ) )
call TriggerAddAction( t, function BagSystemInterface )
endfunction
endscope
The problem is that the function New causes a error saying Undeclared variable New.