| 07-26-2006, 05:29 AM | #1 |
I'm trying to create a dialog menu to boot players out of the game, with their name on the button. I have checked my trigger over and over again and I can't seem to find my error, it won't compile. In every line where I create the button: JASS:set udg_BootDialogEntries[1] = DialogAddButton(udg_BootDialog, ("|c00800080"+a+"|r", 0)) I get a compile error saying "Expected expression". I tried almost everything to no prevail. I have similar functions that create the buttons and set them, but I can't seem to get this one to work. Can anyone help me find my mistake or inform me what I'm doing wrong here? JASS:function BootMenu takes nothing returns nothing local string a = GetPlayerName(Player(1)) local string b = GetPlayerName(Player(2)) local string c = GetPlayerName(Player(3)) local string d = GetPlayerName(Player(4)) local string e = GetPlayerName(Player(5)) call DialogClear(udg_BootDialog) call DialogSetMessage(udg_BootDialog, "Who do you want to boot?") if (GetPlayerSlotState(Player(1))==PLAYER_SLOT_STATE_PLAYING) then set udg_BootDialogEntries[1] = DialogAddButton(udg_BootDialog, ("|c000000ff"+a+"|r", 0)) endif if (GetPlayerSlotState(Player(2))==PLAYER_SLOT_STATE_PLAYING) then set udg_BootDialogEntries[2] = DialogAddButton(udg_BootDialog, ("|c00008080"+b+"|r", 0)) endif if (GetPlayerSlotState(Player(3))==PLAYER_SLOT_STATE_PLAYING) then set udg_BootDialogEntries[3] = DialogAddButton(udg_BootDialog, ("|c00800080"+c+"|r", 0)) endif if (GetPlayerSlotState(Player(4))==PLAYER_SLOT_STATE_PLAYING) then set udg_BootDialogEntries[4] = DialogAddButton(udg_BootDialog, ("|c00ffff00"+d+"|r", 0)) endif if (GetPlayerSlotState(Player(5))==PLAYER_SLOT_STATE_PLAYING) then set udg_BootDialogEntries[5] = DialogAddButton(udg_BootDialog, ("|c00ff8040"+e+"|r", 0)) endif set udg_BootDialogEntries[6] = DialogAddButton(udg_BootDialog, "Exit Menu", 0) call DialogDisplay(Player(0), udg_BootDialog, true) endfunction |
| 07-26-2006, 05:50 AM | #2 |
JASS:("|c00800080"+a+"|r", 0) |
| 07-26-2006, 06:52 AM | #3 |
That did it, thanks a ton! |
