in' unable to find why that don't work;
this Fonction must be used only if the 2 value are on True ( Bool function)
buseMH2BrodcastMultikillMessage==True ; clients side ( the player can enable or diseable it
bBrocastMH2GOLDMHAMultikillMessages==True; Serverside and only a ServerAdmin can enable or disable it to alowed or not this function)
i got this error if i put my if with && like that :
Error: C:\UT coding\UnrealTournament\NexgenMH2MB112SDL\Classes\NexgenMH2MBClient.uc(127) : Error, '&&': Bad command or expression
Code: Select all
/***************************************************************************************************
*
* $DESCRIPTION Broadcasts an MH2 GOLD MHA Multikill Message to all players.
*
**************************************************************************************************/
function broadcastmh2Multikill(int type, string playerName) {
local string msg;
if(buseMH2BrodcastMultikillMessage==True) && (bBrocastMH2GOLDMHAMultikillMessages==True);
if (type == 0) {
msg = class'NexgenUtil'.static.format(mh2MultikillMessage, playerName);
} else if(type == 1) {
msg = class'NexgenUtil'.static.format(mh2multiKillMessage[0], playerName);
} else if(type == 2) {
msg = class'NexgenUtil'.static.format(mh2multiKillMessage[1], playerName);
} else if(type == 3) {
msg = class'NexgenUtil'.static.format(mh2multiKillMessage[2], playerName);
} else if(type ==4) {
msg = class'NexgenUtil'.static.format(mh2multiKillMessage[3], playerName);
} else if(type == 5) {
msg = class'NexgenUtil'.static.format(mh2multiKillMessage[4], playerName);
} else if(type == 6 ) {
msg = class'NexgenUtil'.static.format(mh2multiKillMessage[5], playerName);
}else if(type >= 7 && type <=39) {
msg = class'NexgenUtil'.static.format(mh2multiKillMessage[6], playerName);
}else if(type >= 40 ) {
msg = class'NexgenUtil'.static.format(mh2multiKillMessage[7], playerName);
}
if(msg != "") control.broadcastMsg(msg);
}
Error: C:\UT coding\UnrealTournament\NexgenMH2MB112SDL\Classes\NexgenMH2MBClient.uc(127) : Error, Bad or missing expression after '&&'
Code: Select all
/***************************************************************************************************
*
* $DESCRIPTION Broadcasts an MH2 GOLD MHA Multikill Message to all players.
*
**************************************************************************************************/
function broadcastmh2Multikill(int type, string playerName) {
local string msg;
if(buseMH2BrodcastMultikillMessage==True && bBrocastMH2GOLDMHAMultikillMessages==True);
if (type == 0) {
msg = class'NexgenUtil'.static.format(mh2MultikillMessage, playerName);
} else if(type == 1) {
msg = class'NexgenUtil'.static.format(mh2multiKillMessage[0], playerName);
} else if(type == 2) {
msg = class'NexgenUtil'.static.format(mh2multiKillMessage[1], playerName);
} else if(type == 3) {
msg = class'NexgenUtil'.static.format(mh2multiKillMessage[2], playerName);
} else if(type ==4) {
msg = class'NexgenUtil'.static.format(mh2multiKillMessage[3], playerName);
} else if(type == 5) {
msg = class'NexgenUtil'.static.format(mh2multiKillMessage[4], playerName);
} else if(type == 6 ) {
msg = class'NexgenUtil'.static.format(mh2multiKillMessage[5], playerName);
}else if(type >= 7 && type <=39) {
msg = class'NexgenUtil'.static.format(mh2multiKillMessage[6], playerName);
}else if(type >= 40 ) {
msg = class'NexgenUtil'.static.format(mh2multiKillMessage[7], playerName);
}
if(msg != "") control.broadcastMsg(msg);
}