• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

[Trigger] "Cannot load map data" after changing triggers

Status
Not open for further replies.

Antares

Spell Reviewer
Level 22
Joined
Dec 13, 2009
Messages
529
Hi,

this could go into either Triggers & Scripts or World Editor Help Zone. But it seems to be that the triggers are causing it, so I put it here.

Recently, I got the error message "Cannot load map data" when I tried to open my map in Warcraft III after making some changes. I couldn't get rid of the bug by saving it again or under a different name, but the previous version was working, so I decided that the map file probably just got randomly corrupted and started from the previous version again.

I worked on some triggers again and the bug reappeared. Now I managed to pin down when the error occurs. The first one was when I changed the temporary point variables in a trigger because they were conflicting with others. I found that there was one unnecessary point declaration that leaked, which I removed, fixing the bug.

Code:
set udg_diepoint2 = GetUnitLoc( udg_pirate )

The variable is never used again in that trigger.

Then I went back to what I initially wanted to do in the new version, that is, changing my triggers that create sound effects for some players only. I was told that setting the sound volume locally is the best way to do it.

Code:
    local real volume = 0
    [...]
    set udg_tempinteger = 1
    loop
        exitwhen udg_tempinteger > 9
        if ( IsPlayerInForce(ConvertedPlayer(udg_tempinteger), udg_tipsplayergroup) == true ) then
            set udg_tempforce = GetForceOfPlayer(ConvertedPlayer(udg_tempinteger))
            call DisplayTimedTextToForce( udg_tempforce, 20.00, "TRIGSTR_12389" )
            call DestroyForce( udg_tempforce )
            if ( GetLocalPlayer() == ConvertedPlayer(udg_tempinteger) ) then
            set volume = 100
            endif
        else
        endif
        set udg_tempinteger = udg_tempinteger + 1
    endloop
    call SetSoundVolumeBJ( gg_snd_hint , volume )
    call PlaySoundBJ( gg_snd_Hint )

Here, adding the line "call SetSoundVolumeBJ( gg_snd_hint , volume )" caused the bug to reappear. Using the non-BJ function doesn't change anything.

No idea what is going on here. I tried to google the problem, but I could only find threads about the bug appearing when you load the map from the editor. This is not this bug! I'm trying to load from Warcraft 3.

I'm using World Editor Extended, but only to increase the doodad limit.

Thanks for any help!
 
Status
Not open for further replies.
Top