HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Great Bug Help Plz!

06-21-2006, 01:36 PM#1
StockBreak
Hi, I was editing my map WITHOUT using any trigger (just editing object editor and abilities) and, when I tried to save, a never-seen-before error message appeared!!! Now it's impossible to save the map!!! The game says that there are errors, but what errors??? I didn't edited nothing!
Collapse JASS:
//***************************************************************************
//*
//*  Unit Creation
//*
//***************************************************************************

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

    set u = CreateUnit( p, 'htow', 576,0, -384,0, 270,000 )
endfunction

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

    set u = CreateUnit( p, 'uaco', 821,4, -1083,4, 13,678 )
    set u = CreateUnit( p, 'uaco', 821,4, -1083,4, 13,678 )
    set u = CreateUnit( p, 'ushd', 269,5, -500,8, 217,316 )
    set u = CreateUnit( p, 'uaco', 714,2, -691,9, 155,004 )
    set u = CreateUnit( p, 'uaco', 714,2, -691,9, 155,004 )
    set u = CreateUnit( p, 'uaco', 1050,9, -724,7, 201,023 )
    set u = CreateUnit( p, 'hrif', 290,9, -988,1, 308,301 )
    set u = CreateUnit( p, 'hrif', 290,9, -988,1, 308,301 )
    set u = CreateUnit( p, 'Obla', 445,6, -2148,1, 280,193 )
    set u = CreateUnit( p, 'Obla', 223,2, -1802,3, 96,590 )
    call SetHeroLevel( u, 10, false )
    set u = CreateUnit( p, 'hpea', 666,9, -1035,1, 219,920 )
    set u = CreateUnit( p, 'hpea', 666,9, -1035,1, 219,920 )
    set gg_unit_Opgh_0009 = CreateUnit( p, 'Opgh', 54,6, -791,3, 321,020 )
    call SetHeroLevel( gg_unit_Opgh_0009, 10, false )
    set gg_unit_Opgh_0009 = CreateUnit( p, 'Opgh', 54,6, -791,3, 321,020 )
    call SetHeroLevel( gg_unit_Opgh_0009, 10, false )
    set gg_unit_Udea_0012 = CreateUnit( p, 'Udea', 779,4, -1693,8, 152,077 )
    set gg_unit_Udea_0012 = CreateUnit( p, 'Udea', 690,1, -1482,7, 152,077 )
    set u = CreateUnit( p, 'hpea', 836,5, -400,8, 176,907 )
    set u = CreateUnit( p, 'hspt', 458,7, -1484,0, 322,074 )
    set u = CreateUnit( p, 'hspt', 325,4, -1366,9, 322,074 )
    set u = CreateUnit( p, 'H000', 83,4, -1257,3, 207,494 )
endfunction
06-21-2006, 01:43 PM#2
Captain Griffen
The game appears to have created two CreateBuildingsForPlayer0 functions. Suggest you remove all preplaced units (copy them first, after using the select all), then replace them. That ought to fix it.
06-21-2006, 01:49 PM#3
Rising_Dusk
One's create units and the other is create buildings.
So it didn't repeat functions.

Either way, Griff's method should solve the issue.
06-21-2006, 02:07 PM#4
StockBreak
Well, the problem is that I have A LOT of triggers related to those units! Deleting units I have to change them all! Thanks anyway.
06-21-2006, 03:11 PM#5
Vexorian
It is odd that it assigns to gg_unit_Udea_0012 and gg_unit_Opgh_0009 twice, not a cause for compile errors, but it seems that the preplaced units were screwed up some how making WE generate bad code. I think you'll have to remove preplaced units and try again. But before that try adding some units or modiffying the preplaced units somehow.
06-22-2006, 12:21 AM#6
StockBreak
I found the problem, probably a bug: the editor created 2 OF EVERY PREPLACED UNIT on my map (if I tried to drag one of them, I could see another one below that one); the bug is that they had the same name, so removing 1 of the 2 caused the editor to edit/deleting the related triggers; I had to remove all of them rewriting all the triggers. I dunno why it happened... Thanks anyway to all.