• 🏆 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!

Trying to save a map in Editor and gets Script Error all the time! Help!

Status
Not open for further replies.
Level 4
Joined
Jan 28, 2013
Messages
94
I have been making maps now and then for the last few years. The maps has always saved properly without any problems. The computer I uses has always had a earlier version of the Editor. Recently I updated Warcraft III to the latest patch, v.1.26. Things worked fine until yesterday. The mapmaking were going well but my computer crashed several times. The computer isn't the best but it can run Warcraft 3: 2GB RAM, 2.2 single-core CPU, 256 MB Graphics Card ATI Radeon HD 3200, DirectX 9, 320 GB HardDrive. I think it crashed due to over-heating or that the Single-Core CPU couldn't keep up. It happens now and then that my computer crashes, mostly because of too high graphics options.

However since yesterday every time I try to save a map, I get a Script Error window during "Compiling of map archive". I can't even make a basic, very simple, map! I don't know what to do. Is there anybody who could give me some solution on this problem please? All I can think of is to uninstall and re-install everything.:vw_sad:

Edit:
Here's the Script Error Window for a Basic 1vs1 map with a few Neutral Hostiles (2 Ogre Warrior, 1 Ogre Magi, 1 Ogre Mauler, 1 Ogre Lord) in the middle:
JASS:
//===========================================================================
// 
// Just another Warcraft III map
// 
//   Warcraft III map script
//   Generated by the Warcraft III World Editor
//   Date: Wed Jan 30 18:17:32 2013
//   Map Author: Unknown
// 
//===========================================================================

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

globals
    // Generated
    trigger                 gg_trg_Melee_Initialization = null
endglobals

function InitGlobals takes nothing returns nothing
endfunction

//***************************************************************************
//*
//*  Unit Creation
//*
//***************************************************************************

//===========================================================================
function CreateNeutralHostile takes nothing returns nothing
    local player p = Player(PLAYER_NEUTRAL_AGGRESSIVE)
    local unit u
    local integer unitID
    local trigger t
    local real life

    set u = CreateUnit( p, 'nogr', -334,2, -138,4, 196,409 )
    set u = CreateUnit( p, 'nogr', -70,0, -123,1, 56,944 )
    set u = CreateUnit( p, 'nomg', -240,8, 5,2, 130,763 )
    set u = CreateUnit( p, 'nogm', -173,3, -307,5, 314,691 )
    set u = CreateUnit( p, 'nogl', -8,9, -268,3, 274,029 )
endfunction

//===========================================================================
function CreatePlayerBuildings takes nothing returns nothing
endfunction

//===========================================================================
function CreatePlayerUnits takes nothing returns nothing
endfunction

//===========================================================================
function CreateAllUnits takes nothing returns nothing
    call CreatePlayerBuildings(  )
    call CreateNeutralHostile(  )
    call CreatePlayerUnits(  )
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\\DNCLordaeronTerrain\\DNCLordaeronTerrain.mdl", "Environment\\DNC\\DNCLordaeron\\DNCLordaeronUnit\\DNCLordaeronUnit.mdl" )
    call NewSoundEnvironment( "Default" )
    call SetAmbientDaySound( "LordaeronSummerDay" )
    call SetAmbientNightSound( "LordaeronSummerNight" )
    call SetMapMusic( "Music", true, 0 )
    call CreateAllUnits(  )
    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, -704,0, -3136,0 )

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

The errors are:
Line 40: Invalid number of arguments
Line 41: Invalid number of arguments
Line 42: Invalid number of arguments
Line 43: Invalid number of arguments
Line 44: Expected '
Line 132: Invalid number of arguments
Line 161: Invalid number of arguments
 
Level 4
Joined
Jan 28, 2013
Messages
94
I tried re-installing but I still get compile errors. I'll try to use a registry cleaning but if that doesn't help then I gives up.

EDIT. Well I know what the problem is now. It's the patch. I could save in both Warcraft III: Reign of Chaos and Warcraft III: Frozen Throne but once I patched it up I couldn't use the editor anymore. I suppose it's because the patch is either bad or Windows 7 isn't compatible. I have a legal copy of the game and I patched via Battle.net I suppose I have to either downgrade to be able to make maps, patch up to a patch before things stopped working or wait for a patch which will fix the issue.

The patch is causing the trouble. Once I patched up I couldn't use the Editor anymore. I have tried to uninstall and re-install twice now. Is there any way to work around that issue?
 
Last edited:
Level 4
Joined
Jan 28, 2013
Messages
94
Do you have NewGen and are you current using WE Vanilla? If so, NewGen will semi screw up WE Vanilla due to the files it generates if you have it in the main wc3 directory.
I got both Reign of Chaos and The Frozen Throne installed. The CD's are a bit old though. The original version of Reign of Fire on my copy is v.1.00. It's a legal copy, Best Seller Series version. I could use the editor with both programs installed before I patched up to patch 1.26 or 1.27 via Battle.net

I don't know what NewGen is...

Edit. I have been testing to see which patch screw things up. So far I got WC: RoC on patch 1.90b and no problems with Editor. I can't find the Unit - Damage Area action but I suppose it's a Frozen throne action.
 
If you installed Wc3 Reign or chaos first then The Frozen Throne and updated your Wc3: The Frozen Throne Via Battle.net (online through Wc3) then nothing should go wrong if you are trying to save a blank map.
If you did what I said correctly then everything should be running just fine. If not download the whole game through the Blizzard website with your CD Key(I haven't done this myself although I have heard several time that this can be done).
 
Level 1
Joined
Apr 24, 2009
Messages
44
set u = CreateUnit( p, 'nogr', -334,2, -138,4, 196,409 )

Real numbers are represented with dots, not commas.
Thus: the correct one is p, 'nogr', -334.2, -138.4, 196.409
Fix all the lines with CreateUnit.


EDIT: Wait, I didn't read almost anything from your first post... I guess it's an editor issue if it deliberately puts commas there..
 
Level 4
Joined
Jan 28, 2013
Messages
94
If you installed Wc3 Reign or chaos first then The Frozen Throne and updated your Wc3: The Frozen Throne Via Battle.net (online through Wc3) then nothing should go wrong if you are trying to save a blank map.
If you did what I said correctly then everything should be running just fine. If not download the whole game through the Blizzard website with your CD Key(I haven't done this myself although I have heard several time that this can be done).
Thanks for the input. However that was one of the first things I tried and it doesn't work. Even if the map is blank, Player Locations and Camera Bounds causes script errors because it puts them pesky " , " everywhere. Previously to patch 1.21a.- 1.22a there wasn't any problems. Now it's always problems. It's doing my head in.

Yeah I'll try to download it from Blizzard and see if that helps. But as the problem lies in a patch I am not sure it'll help. But I can try.

Thanks anyway.
 
Level 2
Joined
Jan 20, 2011
Messages
4
Same paradox !!!

I have the exact same error.
I use windows 7.
Wc3 German.
But i tried already to reinstall with english and other language versions.
From different sources.
Even with a format of the hdd.
Different patching methods.
I looked up the whole registry.
Compared files with other systems.

But without any effect.

When i install 1.21b RoC and TfT everything works fine.
As soon i patch one version higher i get whenever i save a map a script error!
I mean all maps! From blizzard, custom, ladder a Scrpt error when saving.
Cause when the script is beeing created. it appears to be not vaild for the patch version higher than 1.21b till 1.26.
I can save but my file is currupt untill a friend reloads and resaves it on an english former installed version of Wc3 which has right now 1.26.

Which is a paradox for me and the other guy that created the post.

Maybe someone can help us!


Thank you in any case!

I
 
Level 4
Joined
Jan 28, 2013
Messages
94
I have the exact same error.
I use windows 7.
Wc3 German.
But i tried already to reinstall with english and other language versions.
From different sources.
Even with a format of the hdd.
Different patching methods.
I looked up the whole registry.
Compared files with other systems.

But without any effect.

When i install 1.21b RoC and TfT everything works fine.
As soon i patch one version higher i get whenever i save a map a script error!
I mean all maps! From blizzard, custom, ladder a Scrpt error when saving.
Cause when the script is beeing created. it appears to be not vaild for the patch version higher than 1.21b till 1.26.
I can save but my file is currupt untill a friend reloads and resaves it on an english former installed version of Wc3 which has right now 1.26.

Which is a paradox for me and the other guy that created the post.

Maybe someone can help us!


Thank you in any case!

I
A friend of mine also run World Editor on Windows 7. Sure he just recently patched but so far he doesn't have any problems. However he has a 32 bit version while I got 64 bit. It's possibly that may be the cause of trouble.

However there's a solution to the problem! At least that's what worked for me. I downloaded the JNGP editor which is a modded version of the Editor with better JASS support and options. I also changed in my Language Settings so that the system uses . instead of ,
It's under Control Panel > Clock, language and national options > National options and language configuration > "Additional settings..." under the Format tab. (I tried to translate the path to to best of my ability. I hope it's good enough!) There you can change the decimal sign from , to . Then you save the settings via Implement in all dialogue windows. That was what worked for me anyhow. Tell me if it works for you!
I also cleaned the registry with CCleaner. That didn't help at first but I figured I could add that anyway.

I believe that the reason we both have trouble is because both our languages has the same roots. At least that's what I've heard.
 

Dr Super Good

Spell Reviewer
Level 63
Joined
Jan 18, 2005
Messages
27,195
Change the local decimal deliminator to '.' instead of ','. This is done in the control pannel under Region and Language in the additional settings... window. You will need to apply it and then restart your computer.

This is caused by WarCraft III coupling the automatic script generation with the OS localization yet JASS itself as a language is not localized. In germany and some places the ',' is used as the decimal point which JASS cannot handle. In the UK and other places the '.' is the decimal point which is what JASS is designed for.
 
Status
Not open for further replies.
Top