• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[JASS] DGUI Functions help!

Status
Not open for further replies.
Level 8
Joined
May 15, 2008
Messages
492
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.
 
Status
Not open for further replies.
Top