• 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.

Compile Errors!

Status
Not open for further replies.
Level 4
Joined
Jan 28, 2013
Messages
94
I need help with solving Script Errors caused while Compiling Map Archive

Well, I don't know if this is the right forum to post this. If it is then I apologize and please point me to the correct forum.

I have been working on a map for the last few days. It's a Dungeon styled map with triggers and custom objects. It's has been a lot of fun.

However today when I tried to save and quit a dialog box told me that there was 66 compile errors! I don't understand the programming language it's written in at all. (I am pretty sure it's JASS. It looks like it anyway.) I can save the map but not test it. I tried removing everything and reseting everything in the map. However I still get 2 error messages! I also tried the back-up (WorldEditTest.w3x) but it also had those errors. :goblin_cry: I don't know what to do other than giving up. I can't understand the error text and can't solve the problems on my own.

My computer did crash several times during map making from what I assume were over-heating. Is it possible that corrupted the file somehow?

I would appreciate if anyone could help me with this. I'll attach the error log. If it's needed I'll also attach the map in question.

Btw I am running Warcraft 3 on a low-end computer (2GB RAM, AMD Sempron 2.2 single-core CPU, ATI Radeon HD 3200 with 256 MB built-in graphics RAM) with Windows 7.
 

Attachments

  • CompileErrorLog 4 DungeonTest - secure.txt
    44.8 KB · Views: 215
Last edited:

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,258
JASS:
    set gg_dest_ATg1_0006 = CreateDestructable( 'ATg1', -256,0, 0,0, 270,000, 0,900, 0 )
    set gg_dest_DTg1_0172 = CreateDestructable( 'DTg1', -2496,0, -1856,0, 270,000, 0,900, 0 )
    set gg_dest_DTg1_0229 = CreateDestructable( 'DTg1', -1664,0, -192,0, 270,000, 0,900, 0 )
    set gg_dest_DTg3_0004 = CreateDestructable( 'DTg3', 512,0, -1344,0, 0,000, 0,900, 0 )
    set gg_dest_DTg3_0002 = CreateDestructable( 'DTg3', -1024,0, -1344,0, 0,000, 0,900, 0 )
    set gg_dest_DTlv_0227 = CreateDestructable( 'DTlv', -864,0, 480,0, 270,000, 1,000, 0 )
    set d = CreateDestructable( 'LTcr', -2112,0, -1088,0, 127,000, 1,000, 0 )
You are passing CreateDestructable too many arguments.

It has the following decleration...
JASS:
native CreateDestructable takes integer objectid,real x,real y,real face,real scale,integer variation returns destructable
As you can see it only expects 6 arguments but you are giving it as many as 10.

WarCraft III was made in the United States of America and thus uses standard programming declerations for constants.

'.' is used as the fractional separator (decimal point).
',' is used to separate arguments for a function call.

What you probably mean to do is like the following...
JASS:
set gg_dest_ATg1_0006 = CreateDestructable( 'ATg1', -256, 0, 270, 0.900, 0 )
 
Level 4
Joined
Jan 28, 2013
Messages
94
Thanks but that code doesn't tell me a lot. I don't understand JASS. The thing is, I don't got any trigger which creates Destructable. I have placed out Destructables though. (can't spell that even...) I got 1 trigger which deals with a Destructable which dies. I only use GUI...

Edit. On the other hand my OS is in Swedish. Could that cause trouble?
Edit2. I got 9 gates which I open/close and makes invulnerable. Then I got three dodads which I got stuff in and a couple of Item tables which I use.
Maybe I should sleep on it.

EDIT 3: After a night's sleep I re-analyzed the errors in the map. I figured out what object caused the error but not how or how I should solve it.

This is what I did:

I started off with 66 Script Errors. I the went along and removed all the error objects:

Removed Item tables from Crates
Removed placed Item
Removed all Gates
/Disabled Invulnerable Trigger
/Disabled all Gate Triggers
Removed Lever
Removed All placed Buildings
Removed All placed units which belongs to a Player (Buildings & Units)
Removed all Neutral Hostile units
Removed all Neutral Passive units
Removed all Regions
/disabled All Region Triggers
Reset Map Description, Reset Map Options, Reset Camera & Map Bounds - no effect however.
Reset Triggers - didn't help either.
Reset Player Options and Force Options - solved start location error.

Still got 2 more errors which I can't solve though.

JASS:
    call SetDayNightModels( "Environment\\DNC\\DNCDungeon\\DNCDungeonTerrain\\DNCDungeonTerrain.mdl", "Environment\\DNC\\DNCDungeon\\DNCDungeonUnit\\DNCDungeonUnit.mdl" )

    call InitCustomPlayerSlots(  )

Besides these last 2 errors, removing pretty much every Destructible and Unit solved the Script Errors. However I do not know what caused the errors! Now I am back at a Standard Melee map... and I still can't test the map because of these two pesky errors!

I need some help please. I have no idea how I should script things better. I don't know a single thing about JASS (although I did figure out which numbers pointed to a Object's coordinates.) I only use GUI and the Editor itself.
 
Last edited:
Level 4
Joined
Jan 28, 2013
Messages
94
Sounds like a localization error where loclized values are being input directly into non-localized fields. You may find that ',' is your decimal point and as such it incorrectly uses it instead of '.' which is the decimal point it expects.

I tried to use , instead of . but the box refused to comply. I can only use . in the GUI value boxes.

The problem persists through all maps I open in Editor. Not even a re-install solved the problem. I still get:
JASS:
    call SetDayNightModels( "Environment\\DNC\\DNCDungeon\\DNCDungeonTerrain\\DNCDungeonTerrain.mdl", "Environment\\DNC\\DNCDungeon\\DNCDungeonUnit\\DNCDungeonUnit.mdl" )
 
    call InitCustomPlayerSlots(  )
As compile errors in Map Script as I try to save a map which is almost empty.
 
Level 4
Joined
Jan 28, 2013
Messages
94
It is a problem with your opperating system localization and WorldEditor not coupling localization into the trigger compilers. You will need to change the localization of your operating system to something like UK or US for it to work as expected.

I have never had any problems with WorldEditor and Swedish OS before and I have been making maps for years. It wasn't until I downloaded the patch and my computer crashed during building that I started having problems. I can't create a single map without getting this compile error, even if the map is completely empty. How would changing my localization solve the problem? I don't even know how to do that. What'll happen with files I got on my computer which has å, ä, or ö in them if I change the local?
 
Level 4
Joined
Jan 28, 2013
Messages
94
In Windows 7 (maybe other Windows?)...
Control Panel -> Region and Language -> Additional Settings...

Change the "Decimal symbol" to . if possible. This may require you to install English language packs if it is not available from the dropdown selection.

I did as you said but it didn't solve my problem. I changed every language setting I could find to English (UK). But it didn't help at all.

The problem lies in the Map Script, under the Main Initialization section. The program tells me there are too many arguments in SetDayNightModels for the tileset and in InitCustomPlayerSlots. I haven't touched those! The CreateDestructable error was caused because I had a few Destructibles (Gates in this case) on some locations in the map. I haven't scripted those either, I just placed them out. For some reason my Editor don't want me to use any Destructibles other than trees, no item sets for crates, no units at all, no regions and no Custom settings.

Even an empty map with nothing in it causes these SetDayNightModels and InitCustomPlayerSlots script errors.

I have been able to find the root to the error. It's in one of the patches. Until I updated to the recent patch I had no problems whatsoever with the Editor. Now I can't built a single map. I think it's similar to the error Mac users had.

Thanks for taking your time trying to help me. Sadly nothing has changed, I'm still at square one with a useless Editor. I would appreciate if you or someone else could help me solve it but I can't see that happening. Obviously there's some error in some patch somewhere which renders my Editor useless. As I see it I got 2 choices, either I give up map making or I uninstall the patches. I could install up to the patch before the patch which killed my editor came. But then again both this options means that I can't share or play any maps. But then again, maybe that's how it has to be.

Now I'll go and reset the language settings because I can't write on this English board... the tangents has other functions than what's show on my physical keyboard.

Edit. I can't even save a Custom Map by Blizzard themselves. Yep, I am talking about BlizzardTD. If I try to save a copy of that map I get 900+ compile errors in the Map Script. It's obviously not me who's doing something wrong, unless my computer does something bad in the background. But that's not the case either. My Editor is broke.
 
Last edited:

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,258
SetDayNightModels
That is not causing the error, it is the line above (call SetCameraBounds) that is causing the error, just the syntax checker in WarCraft III is very poor and buggy. Thus why people mostly use JNGP as JassHelper does a better job.

call SetCameraBounds takes 8 arguments, you are giving it 16. Again because your native localization is set to use ',' (comma) to separate the fractional part as opposed to '.' (period/full stop) which WarCraft III is designed for.

Same thing is the case with InitCustomPlayerSlots, the error is on the line above. In this case it is DefineStartLocation being passed 5 arguments when it expects 3 (again due to the use of a comma as the fractional separator).

It is silly that it is coupling this through to the map save and with all respect can be viewed as a bug and not a failing on your part (this just should not happen). I am guessing they are using something like "printf" to generate the strings for compiling the script which produces local dependant strings.

EDIT:
Seems like it is not coupling from the OS, atleast I could not make it so. What language WarCraft III did you install?
 
Level 4
Joined
Jan 28, 2013
Messages
94
That is not causing the error, it is the line above (call SetCameraBounds) that is causing the error, just the syntax checker in WarCraft III is very poor and buggy. Thus why people mostly use JNGP as JassHelper does a better job.

call SetCameraBounds takes 8 arguments, you are giving it 16. Again because your native localization is set to use ',' (comma) to separate the fractional part as opposed to '.' (period/full stop) which WarCraft III is designed for.

Same thing is the case with InitCustomPlayerSlots, the error is on the line above. In this case it is DefineStartLocation being passed 5 arguments when it expects 3 (again due to the use of a comma as the fractional separator).

It is silly that it is coupling this through to the map save and with all respect can be viewed as a bug and not a failing on your part (this just should not happen). I am guessing they are using something like "printf" to generate the strings for compiling the script which produces local dependant strings.

EDIT:
Seems like it is not coupling from the OS, atleast I could not make it so. What language WarCraft III did you install?
It's installed in English. I don't know about the patches since it's an auto update via Battle.net When I install WC I can't even chose language. It just asks for name and CD-key and the rest is done automatically. I have never had this problem before, only since the patch update and subsequent computer crashes. I have uninstalled and reinstalled three times but the problem always occur after patching up. I have even cleaned registry and other temporary files with CCleaner but nothing helps. I am currently trying to figure out which patch causes the problem and then not download it.

Edit. I save a map. Everything goes fine until it's Generating the Map Script. Then the Script Error window pops up and shows all the compile errors in the script. The map saves however but WC can't read it. I can't test or play it. WC will try to start the map but then I'll just get returned back to the Start Map dialog.

Edit 2. Y'know... what you say... it does make sense. The program can't have 8 camera bounds when there's only 4. It's strange that it read coordinates so strangely.
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,258
It is something related to your OS installation as they use ',' in as the fractional separator in Sweden. This is the only explanation why it is happening as it is clear that ',' is being used as the fractional separator from the generated script. However it seems something more embeded than just changing a field in the Control Panel.
 
Level 4
Joined
Jan 28, 2013
Messages
94
It is something related to your OS installation as they use ',' in as the fractional separator in Sweden. This is the only explanation why it is happening as it is clear that ',' is being used as the fractional separator from the generated script. However it seems something more embeded than just changing a field in the Control Panel.

I am not sure the OS is to blame. Obviously there's some problem with how the Editor reads its script. Possibly the different language has something to do with it but I can't stop thinking that maybe one of the patches made the program read things differently. Perhaps instead of following English standard it runs via the language on the computer. When I did change local, the UI remained in Swedish.. Buttons changed as well as date and place. But as I said before, I have been testing which patch caused the problem. That's why I am currently on WC: RoC v. 1.90b

This is a piece of script from a new test level, WC: RoC 1.90
JASS:
function config takes nothing returns nothing
    call SetMapName( "Just another Warcraft III map" )
    call SetMapDescription( "Nondescript" )
    call SetPlayers( 2 )
    call SetTeams( 2 )
    call SetGamePlacement( MAP_PLACEMENT_USE_MAP_SETTINGS )

    call DefineStartLocation( 0, 3072.0, -3008.0 )
    call DefineStartLocation( 1, -2496.0, 2176.0 )

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

This is the same lines from a patched up WC: tFT 1.26 from my fail map:
JASS:
function config takes nothing returns nothing
    call SetMapName( "TRIGSTR_001" )
    call SetMapDescription( "TRIGSTR_003" )
    call SetPlayers( 5 )
    call SetTeams( 5 )
    call SetGamePlacement( MAP_PLACEMENT_USE_MAP_SETTINGS )

    call DefineStartLocation( 0, 2624,0, -5056,0 )
    call DefineStartLocation( 1, 0,0, 4608,0 )
    call DefineStartLocation( 2, -2688,0, -5184,0 )
    call DefineStartLocation( 3, 2432,0, 1344,0 )
    call DefineStartLocation( 4, -3072,0, -1408,0 )

    // Player setup
    call InitCustomPlayerSlots(  )
    call InitCustomTeams(  )
endfunction

Camera line:
Test map:
JASS:
    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) )

Fail map
JASS:
    call SetCameraBounds( -3328,0 + GetCameraMargin(CAMERA_MARGIN_LEFT), -5632,0 + GetCameraMargin(CAMERA_MARGIN_BOTTOM), 3328,0 - GetCameraMargin(CAMERA_MARGIN_RIGHT), 5120,0 - GetCameraMargin(CAMERA_MARGIN_TOP), -3328,0 + GetCameraMargin(CAMERA_MARGIN_LEFT), 5120,0 - GetCameraMargin(CAMERA_MARGIN_TOP), 3328,0 - GetCameraMargin(CAMERA_MARGIN_RIGHT), -5632,0 + GetCameraMargin(CAMERA_MARGIN_BOTTOM) )

It's the same OS. Just different versions of the game. Some patch caused the problem. Is it possible for me to manually alter the script and then import the edited script into the map? That would at least solve the issue, although it might be difficult. Either that or a new patch which solves the error. Or something else.
 
Level 1
Joined
May 15, 2013
Messages
2
Yes, I am very aware of what goes wrong. But as StormChaser already has stated simply changing any or all language settings, even the one that specifies whether ',' or '.' should be used as the decimal point, does not work.
I hoped that JNGP would help as you suggest, but that was not the case, unfortunately.

If anyone has any other suggestions, they are very welcome.

(I am using Windows 7 Home Premium, if that makes any difference)
 
Status
Not open for further replies.
Top