HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

error...why?

06-12-2002, 09:40 PM#1
Guest
im doing this new map...and it gives me some errors when i try to save it..and when i try to laod it...the game crashes...and i have no idea why, help please
[Noxz]
06-13-2002, 10:01 AM#2
3DGuy
gimme the error pls
06-13-2002, 11:35 AM#3
Guest
this is the buggiest map I ever seen in this game =)
it has around 30 strng errors, codename errors, string errors, you name it. There is something SERIOUSLY wrong with this map

my only suggestion is to restart from scratch as in this current state, it will probably cost more time to fix the errors then create a new map with new set of triggers
06-13-2002, 04:30 PM#4
Mr.123
The error reporting in WE isn't very good yet, so if you have just 1 error in the code, it could give you errors all over because it doesn't/can't parse the rest of the script correctly.

After playing with several solutions, I found that the cause of the error is mainly due to copy/pasting of code text.

When you copied the bounty trig, you got:

Code:
function [b][i]Trig_Untitled_Trigger_001_Actions[/i][/b] takes nothing returns nothing
    call SetPlayerState( Player(11), PLAYER_STATE_GIVES_BOUNTY, 1 )
endfunction

//===========================================================================
function InitTrig_Enable_Player_11_Bounty_Copy takes nothing returns nothing
    set gg_trg_Enable_Player_11_Bounty_Copy = CreateTrigger(  )
    call TriggerAddAction( gg_trg_Enable_Player_11_Bounty_Copy, function [b][i]Trig_Untitled_Trigger_001_Actions[/i][/b] )
endfunction

Notice the bold italized parts. That part doesn't change when you changed the name of your trigger so it remained as the default name. Later in your triggers, you left a trigger with the default name "Untitled Trigger 001". It conflicted with the function/trigger.

All in all, if you change that "Untitled Trigger 001" to another name, you'll be fine. However, you should also change the parts bolded and italized to something else -- it can be anything you want.

[edit]
Ok, so it isn't entirely WE's fault for not being able to report errors correctly. It happens in gcc, vc, and many other commercial compilers out there also. So watch out for those missing/misplaced parentheses and other junk :p.
06-13-2002, 05:04 PM#5
Guest
renaming it fixed everything thanx
[Noxz]
07-10-2002, 03:57 PM#6
Guest
Quote:
Originally posted by Mr.123
Code:
function [b][i]Trig_Untitled_Trigger_001_Actions[/i]The error reporting in WE isn't very good yet, so if you have just 1 error in the code, it could give you errors all over because it doesn't/can't parse the rest of the script correctly.

After playing with several solutions, I found that the cause of the error is mainly due to copy/pasting of code text.

When you copied the bounty trig, you got:

 takes nothing returns nothing
    call SetPlayerState( Player(11), PLAYER_STATE_GIVES_BOUNTY, 1 )
endfunction

//===========================================================================
function InitTrig_Enable_Player_11_Bounty_Copy takes nothing returns nothing
    set gg_trg_Enable_Player_11_Bounty_Copy = CreateTrigger(  )
    call TriggerAddAction( gg_trg_Enable_Player_11_Bounty_Copy, function [b][i]Trig_Untitled_Trigger_001_Actions[/i][/b] )
endfunction

Notice the bold italized parts. That part doesn't change when you changed the name of your trigger so it remained as the default name. Later in your triggers, you left a trigger with the default name "Untitled Trigger 001". It conflicted with the function/trigger.

All in all, if you change that "Untitled Trigger 001" to another name, you'll be fine. However, you should also change the parts bolded and italized to something else -- it can be anything you want. [/b]

How do I get to edit the straight code like that??? I played with the World Editor forever and I couldn't figure it out. In one of the preset maps I just wanted to modify the amount of gold in each mine and the map threw 1030 errors. Any ideas?
07-11-2002, 02:03 PM#7
Guest
select the trigger, then go to somemenu, forget what it is exactly, but in it is something like convert to text string or sumtin...im nto doin wc3 anymroe so i dont know
[Noxz]
07-11-2002, 04:33 PM#8
littlecramp
Edit->convert to custom text