- Joined
- Nov 23, 2008
- Messages
- 18
I've recently started using JASS within the trigger editor, and noticing that the GUI was very inefficient, i decided to switch to pure JASS.
Im creating an RPG in which you need to pick a race and class. Im doing this with dialog boxes. However, when i finished the human class buttons and variable sets, i saved and received the error 'invalid number of arguments' for all of my lines assigning variables to the buttons.
Does anyone know how to fix it? ive checked the variable names and everything...
Im creating an RPG in which you need to pick a race and class. Im doing this with dialog boxes. However, when i finished the human class buttons and variable sets, i saved and received the error 'invalid number of arguments' for all of my lines assigning variables to the buttons.
Code:
function Trig_Initialization_Actions takes nothing returns nothing
call DisplayTextToForce( GetPlayersAll( ), "Welcome to the Legend's Quest Campaign! Please wait until the dialog boxes show up to begin." )
// Dialog Rename
call DialogSetMessageBJ( udg_dialogRace, "Pick Your Race" )
call DialogSetMessageBJ( udg_dialogClassHuman, "Pick Your Class" )
call DialogSetMessageBJ( udg_dialogClassOrc, "Pick Your Class" )
call DialogSetMessageBJ( udg_dialogClassUndead, "Pick Your Class" )
call DialogSetMessageBJ( udg_dialogClassElf, "Pick Your Class" )
// Race Buttons
call DialogAddButton( udg_dialogRace, "Human (+Intelligence)" )
set udg_buttonRace[0] = GetLastCreatedButtonBJ( )
call DialogAddButton( udg_dialogRace, "Orc (+Strength)" )
set udg_buttonRace[1] = GetLastCreatedButtonBJ( )
call DialogAddButton( udg_dialogRace, "Elf (+Agility)" )
set udg_buttonRace[2] = GetLastCreatedButtonBJ( )
call DialogAddButton( udg_dialogRace, "Undead (+Regeneration)" )
set udg_buttonRace[3] = GetLastCreatedButtonBJ( )
// Human Buttons
call DialogAddButton( udg_dialogClassHuman, "Warrior (Vital Strike / Strength)" )
set udg_buttonClassHuman[0] = GetLastCreatedButtonBJ( )
call DialogAddButton( udg_dialogClassHuman, "Ninja (Blunt Force Trauma / Strength)" )
set udg_buttonClassHuman[1] = GetLastCreatedButtonBJ( )
call DialogAddButton( udg_dialogClassHuman, "Viking (Determination Aura / Strength)" )
set udg_buttonClassHuman[2] = GetLastCreatedButtonBJ( )
call DialogAddButton( udg_dialogClassHuman, "Magician (Brilliance Aura / Intelligence)" )
set udg_buttonClassHuman[3] = GetLastCreatedButtonBJ( )
call DialogAddButton( udg_dialogClassHuman, "Wizard (Magic Missile / Intelligence)" )
set udg_buttonClassHuman[4] = udg_GetLastCreatedButtonBJ( )
call DialogAddButton( udg_dialogClassHuman, "Cleric (Cure / Intelligence)" )
set udg_buttonClassHuman[5] = GetLastCreatedButtonBJ( )
call DialogAddButton( udg_dialogClassHuman, "Archer ( / Agility)" )
set udg_buttonClassHuman[6] = GetLastCreatedButtonBJ( )
call DialogAddButton( udg_dialogClassHuman, "Sniper (Lucky Shot / Agility)" )
set udg_buttonClassHuman[7] = GetLastCreatedButtonBJ( )
call DialogAddButton( udg_dialogClassHuman, "Thief, (Invisibility / Agility)" )
set udg_buttonClassHuman[8] = GetLastCreatedButtonBJ( )
call DialogAddButton( udg_dialogClassHuman, "Random" )
set udg_buttonClassHuman[9] = GetLastCreatedButtonBJ( )
endfunction
//===========================================================================
function InitTrig_Initialization takes nothing returns nothing
set gg_trg_Initialization = CreateTrigger( )
call TriggerAddAction( gg_trg_Initialization, function Trig_Initialization_Actions )
endfunction
Does anyone know how to fix it? ive checked the variable names and everything...