• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

[JASS] Invalid number of arguments ...

Status
Not open for further replies.
Level 4
Joined
Mar 5, 2008
Messages
55
After I imported a mp3 file to a new map, i couldn't save or test my map. It came a message:

Line 96: Invalid number of arguments

//================================================== =========================
//
// Just another Warcraft III map
//
// Warcraft III map script
// Generated by the Warcraft III World Editor
// Date: Sat Mar 08 18:26:33 2008
// Map Author: Unknown
//
//================================================== =========================

//************************************************** *************************
//*
//* Global Variables
//*
//************************************************** *************************

globals
// Generated
trigger gg_trg_Melee_Initialization = null
endglobals

function InitGlobals takes nothing returns nothing
endfunction

//************************************************** *************************
//*
//* Triggers
//*
//************************************************** *************************

//================================================== =========================
// Trigger: Melee Initialization
//
// Default melee game initialization for all players
//================================================== =========================
function Trig_Melee_Initialization_Actions takes nothing returns nothing
call MeleeStartingVisibility( )
call MeleeStartingHeroLimit( )
call MeleeGrantHeroItems( )
call MeleeStartingResources( )
call MeleeClearExcessUnits( )
call MeleeStartingUnits( )
call MeleeStartingAI( )
call MeleeInitVictoryDefeat( )
endfunction

//================================================== =========================
function InitTrig_Melee_Initialization takes nothing returns nothing
set gg_trg_Melee_Initialization = CreateTrigger( )
call TriggerAddAction( gg_trg_Melee_Initialization, function Trig_Melee_Initialization_Actions )
endfunction

//================================================== =========================
function InitCustomTriggers takes nothing returns nothing
call InitTrig_Melee_Initialization( )
endfunction

//================================================== =========================
function RunInitializationTriggers takes nothing returns nothing
call ConditionalTriggerExecute( gg_trg_Melee_Initialization )
endfunction

//************************************************** *************************
//*
//* Players
//*
//************************************************** *************************

function InitCustomPlayerSlots takes nothing returns nothing

// Player 0
call SetPlayerStartLocation( Player(0), 0 )
call SetPlayerColor( Player(0), ConvertPlayerColor(0) )
call SetPlayerRacePreference( Player(0), RACE_PREF_HUMAN )
call SetPlayerRaceSelectable( Player(0), true )
call SetPlayerController( Player(0), MAP_CONTROL_USER )

endfunction

function InitCustomTeams takes nothing returns nothing
// Force: TRIGSTR_002
call SetPlayerTeam( Player(0), 0 )

endfunction

//************************************************** *************************
//*
//* Main Initialization
//*
//************************************************** *************************

//================================================== =========================
function main takes nothing returns nothing
call SetCameraBounds( -3328,0 + GetCameraMargin(CAMERA_MARGIN_LEFT), -3584,0 + GetCameraMargin(CAMERA_MARGIN_BOTTOM), 3328,0 - GetCameraMargin(CAMERA_MARGIN_RIGHT), 3072,0 - GetCameraMargin(CAMERA_MARGIN_TOP), -3328,0 + GetCameraMargin(CAMERA_MARGIN_LEFT), 3072,0 - GetCameraMargin(CAMERA_MARGIN_TOP), 3328,0 - GetCameraMargin(CAMERA_MARGIN_RIGHT), -3584,0 + GetCameraMargin(CAMERA_MARGIN_BOTTOM) )
call SetDayNightModels( "Environment\\DNC\\DNCLordaeron\\DNCLordaeronTerra in\\DNCLordaeronTerrain.mdl", "Environment\\DNC\\DNCLordaeron\\DNCLordaeronUnit\ \DNCLordaeronUnit.mdl" )
call NewSoundEnvironment( "Default" )
call SetAmbientDaySound( "CityScapeDay" )
call SetAmbientNightSound( "CityScapeNight" )
call SetMapMusic( "Music", true, 0 )
call InitBlizzard( )
call InitGlobals( )
call InitCustomTriggers( )
call RunInitializationTriggers( )

endfunction

//************************************************** *************************
//*
//* Map Configuration
//*
//************************************************** *************************

function config takes nothing returns nothing
call SetMapName( "Just another Warcraft III map" )
call SetMapDescription( "Nondescript" )
call SetPlayers( 1 )
call SetTeams( 1 )
call SetGamePlacement( MAP_PLACEMENT_USE_MAP_SETTINGS )

call DefineStartLocation( 0, 1216,0, -1344,0 )

// Player setup
call InitCustomPlayerSlots( )
call SetPlayerSlotAvailable( Player(0), MAP_CONTROL_USER )
call InitGenericPlayerSlots( )
endfunction


And there was another one:

Line 124: Invalid number of arguments

//================================================== =========================
//
// Just another Warcraft III map
//
// Warcraft III map script
// Generated by the Warcraft III World Editor
// Date: Sat Mar 08 18:26:33 2008
// Map Author: Unknown
//
//================================================== =========================

//************************************************** *************************
//*
//* Global Variables
//*
//************************************************** *************************

globals
// Generated
trigger gg_trg_Melee_Initialization = null
endglobals

function InitGlobals takes nothing returns nothing
endfunction

//************************************************** *************************
//*
//* Triggers
//*
//************************************************** *************************

//================================================== =========================
// Trigger: Melee Initialization
//
// Default melee game initialization for all players
//================================================== =========================
function Trig_Melee_Initialization_Actions takes nothing returns nothing
call MeleeStartingVisibility( )
call MeleeStartingHeroLimit( )
call MeleeGrantHeroItems( )
call MeleeStartingResources( )
call MeleeClearExcessUnits( )
call MeleeStartingUnits( )
call MeleeStartingAI( )
call MeleeInitVictoryDefeat( )
endfunction

//================================================== =========================
function InitTrig_Melee_Initialization takes nothing returns nothing
set gg_trg_Melee_Initialization = CreateTrigger( )
call TriggerAddAction( gg_trg_Melee_Initialization, function Trig_Melee_Initialization_Actions )
endfunction

//================================================== =========================
function InitCustomTriggers takes nothing returns nothing
call InitTrig_Melee_Initialization( )
endfunction

//================================================== =========================
function RunInitializationTriggers takes nothing returns nothing
call ConditionalTriggerExecute( gg_trg_Melee_Initialization )
endfunction

//************************************************** *************************
//*
//* Players
//*
//************************************************** *************************

function InitCustomPlayerSlots takes nothing returns nothing

// Player 0
call SetPlayerStartLocation( Player(0), 0 )
call SetPlayerColor( Player(0), ConvertPlayerColor(0) )
call SetPlayerRacePreference( Player(0), RACE_PREF_HUMAN )
call SetPlayerRaceSelectable( Player(0), true )
call SetPlayerController( Player(0), MAP_CONTROL_USER )

endfunction

function InitCustomTeams takes nothing returns nothing
// Force: TRIGSTR_002
call SetPlayerTeam( Player(0), 0 )

endfunction

//************************************************** *************************
//*
//* Main Initialization
//*
//************************************************** *************************

//================================================== =========================
function main takes nothing returns nothing
call SetCameraBounds( -3328,0 + GetCameraMargin(CAMERA_MARGIN_LEFT), -3584,0 + GetCameraMargin(CAMERA_MARGIN_BOTTOM), 3328,0 - GetCameraMargin(CAMERA_MARGIN_RIGHT), 3072,0 - GetCameraMargin(CAMERA_MARGIN_TOP), -3328,0 + GetCameraMargin(CAMERA_MARGIN_LEFT), 3072,0 - GetCameraMargin(CAMERA_MARGIN_TOP), 3328,0 - GetCameraMargin(CAMERA_MARGIN_RIGHT), -3584,0 + GetCameraMargin(CAMERA_MARGIN_BOTTOM) )
call SetDayNightModels( "Environment\\DNC\\DNCLordaeron\\DNCLordaeronTerra in\\DNCLordaeronTerrain.mdl", "Environment\\DNC\\DNCLordaeron\\DNCLordaeronUnit\ \DNCLordaeronUnit.mdl" )
call NewSoundEnvironment( "Default" )
call SetAmbientDaySound( "CityScapeDay" )
call SetAmbientNightSound( "CityScapeNight" )
call SetMapMusic( "Music", true, 0 )
call InitBlizzard( )
call InitGlobals( )
call InitCustomTriggers( )
call RunInitializationTriggers( )

endfunction

//************************************************** *************************
//*
//* Map Configuration
//*
//************************************************** *************************

function config takes nothing returns nothing
call SetMapName( "Just another Warcraft III map" )
call SetMapDescription( "Nondescript" )
call SetPlayers( 1 )
call SetTeams( 1 )
call SetGamePlacement( MAP_PLACEMENT_USE_MAP_SETTINGS )

call DefineStartLocation( 0, 1216,0, -1344,0 )

// Player setup
call InitCustomPlayerSlots( )
call SetPlayerSlotAvailable( Player(0), MAP_CONTROL_USER )
call InitGenericPlayerSlots( )
endfunction


So I just thought, damn, I didn't work that much on it, so I created another map. But the same crap happened. When I load another map I've already created, it work just fine to save it or test it. It seems like all maps after that import can't be saved or tested, and that means no way to create new maps!!! Please help, I've searched through the forums and the whole internet, but it's no similar UNDERSTANDABLE thing like this.
 
Status
Not open for further replies.
Top