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

Expected expression

Status
Not open for further replies.
Level 19
Joined
Aug 8, 2007
Messages
2,765
[Unsolved] Expected expression

Hey im trying to save and its giving me an error saying expected Expression. heres my code

JASS:
  call MultiboardSetItemValueBJ( udg_AllMultiboard, 1, 1, ( "|cff006400Players|r" + "|cffFFD700 And |r" + |cff000080Values" ) )


And also, it gives me an error that says "The trigger 'Multiboard' must have an initialization function called 'InitTrig_Multiboard"
Edit : expected, not unexpected..
 
Last edited:
Level 18
Joined
Jan 21, 2006
Messages
2,552
Notice how you forgot a quotation mark before |cff000080Values".

It should be:

JASS:
call MultiboardSetItemValueBJ( udg_AllMultiboard, 1, 1, ( "|cff006400Players|r" + "|cffFFD700 And |r" + "|cff000080Values" ) )

By the way, the " [ l j a s s ] " end-tag is not working properly. It should be ending before the period but instead the entire thing gets highlighted, as well as the line below it.
 
Level 19
Joined
Aug 8, 2007
Messages
2,765
And also, it gives me an error that says "The trigger 'Multiboard' must have an initialization function called 'InitTrig_Multiboard"

4 characters? thats atleast like 30...
 
Level 19
Joined
Aug 8, 2007
Messages
2,765
There is no code. It just gives me this error
\

350roec.jpg



JASS:
function Trig_Multiboard_Copy_Actions takes nothing returns nothing
    call CreateMultiboardBJ( 5, 9, "TRIGSTR_144" )
    set udg_AllMultiboard = GetLastCreatedMultiboard()
    set bj_forLoopAIndex = 1
    set bj_forLoopAIndexEnd = 5
    loop
        exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
        set bj_forLoopBIndex = 1
        set bj_forLoopBIndexEnd = 9
        loop
            exitwhen bj_forLoopBIndex > bj_forLoopBIndexEnd
            call MultiboardSetItemStyleBJ( udg_AllMultiboard, GetForLoopIndexA(), GetForLoopIndexB(), true, false )
            call MultiboardSetItemWidthBJ( udg_AllMultiboard, GetForLoopIndexA(), GetForLoopIndexB(), 7.00 )
            set bj_forLoopBIndex = bj_forLoopBIndex + 1
        endloop
        set bj_forLoopAIndex = bj_forLoopAIndex + 1
    endloop
    call MultiboardSetItemValueBJ( udg_AllMultiboard, 1, 1, ( "|cff006400Players|r" + "|cffFFD700 And |r" + "|cff000080Values" ) )
    call MultiboardSetItemValueBJ( udg_AllMultiboard, 1, 2, ( "|cffFF0000" + ( GetPlayerName(Player(1)) + "|r" ) ) )
    call MultiboardSetItemValueBJ( udg_AllMultiboard, 1, 3, ( "|cff0000FF" + ( GetPlayerName(Player(2)) + "|r" ) ) )
    call MultiboardSetItemValueBJ( udg_AllMultiboard, 1, 4, ( "|cff00FFFF" + ( GetPlayerName(Player(3)) + "|r" ) ) )
    call MultiboardSetItemValueBJ( udg_AllMultiboard, 1, 5, ( "|cffA020F0" + ( GetPlayerName(Player(4)) + "|r" ) ) )
    call MultiboardSetItemValueBJ( udg_AllMultiboard, 1, 6, ( "|cffFFFF00" + ( GetPlayerName(Player(5)) + "|r" ) ) )
    call MultiboardSetItemValueBJ( udg_AllMultiboard, 1, 7, ( "|cffFFA500" + ( GetPlayerName(Player(6)) + "|r" ) ) )
    call MultiboardSetItemValueBJ( udg_AllMultiboard, 1, 8, ( "|cff00FF00" + ( GetPlayerName(Player(7)) + "|r" ) ) )
    call MultiboardSetItemValueBJ( udg_AllMultiboard, 1, 9, ( "|cffFF1493" + ( GetPlayerName(Player(8)) + "|r" ) ) )
    call MultiboardSetItemValueBJ( udg_AllMultiboard, 2, 1, "TRIGSTR_146" )
    call MultiboardSetItemValueBJ( udg_AllMultiboard, 3, 1, "TRIGSTR_147" )
    call MultiboardSetItemValueBJ( udg_AllMultiboard, 5, 1, "TRIGSTR_148" )
    call MultiboardSetTitleTextColorBJ( GetLastCreatedMultiboard(), 100, 0.00, 0.00, 50.00 )
endfunction

//===========================================================================
function InitTrig_Multiboard_Copy takes nothing returns nothing
    set gg_trg_B03060 = CreateTrigger(  )
    call TriggerRegisterTimerEventSingle( gg_trg_B03060, 0.01 )
    call TriggerAddAction( gg_trg_B03060, function Trig_Multiboard_Copy_Actions )
endfunction
 
Do you have an init function to create the trigger? If not, this will remove the error:
JASS:
function InitTrig_Multiboard takes nothing returns nothing
endfunction
//just add this to the bottom of your code

If you do have an initialization function (where you create the trigger, register the events, add the conditions/actions etc.) then replace that function name with "InitTrig_Multiboard".
 
Level 19
Joined
Aug 8, 2007
Messages
2,765
+rep. that fixed it. ty.

Edit : Uhh all the errors were under WE. when i clicked okay they just fucked it up.

Now i cant even open my map. its giving me an error saying Level Data Missing or Invalid. both on nilla and jngp.
 
Last edited:
Level 18
Joined
Jan 21, 2006
Messages
2,552
Post your map.

Illidans911 said:
There is no code. It just gives me this error

From the looks of it, you had code for a Multiboard_Copy inside a trigger named Multiboard and the names did not match up, which is the reason it gives you the error. You can't simply tell us what error messages you get and expect a detailed solution on how to fix it.
 
Adding the function wouldn't cause a map corruption. =\ There's something else that you must've done that caused it to be screwed up. =(

Anyway, if you saved that map with NewGen, try looking the newGen folder and look in their backups folder. It has several maps from a-z that you should look through in case you can find a backup that you saved.
 
Level 19
Joined
Aug 8, 2007
Messages
2,765
aah ty purgenfire. backup works good w/ a recent version. id +rep but it says i have to rep around =P


and i also fixed the init trig problem by copy n pasteing the init trig from a new doc :)
 
Status
Not open for further replies.
Top