Problem with 2 actions in one case
#1

I can't do 2 actions in one case... what i need to do?
pawn Код:
if(dialogid == 5){
    if(response)
    switch(listitem){
    case 0: DOF2_SetInt(RFile(playerid),"Money", DOF2_GetInt(RFile(playerid), "Money")-2500); GivePlayerWeapon(playerid,22,99999);
    case 1: DOF2_SetInt(RFile(playerid),"Money", DOF2_GetInt(RFile(playerid), "Money")-5000); GivePlayerWeapon(playerid,24,75);
    case 3: DOF2_SetInt(RFile(playerid),"Money", DOF2_GetInt(RFile(playerid), "Money")-7500); GivePlayerWeapon(playerid,25,80);
    case 4: DOF2_SetInt(RFile(playerid),"Money", DOF2_GetInt(RFile(playerid), "Money")-10000); GivePlayerWeapon(playerid,29,250);
    case 5: DOF2_SetInt(RFile(playerid),"Money", DOF2_GetInt(RFile(playerid), "Money")-12000); GivePlayerWeapon(playerid,30,250);
    case 6: DOF2_SetInt(RFile(playerid),"Money", DOF2_GetInt(RFile(playerid), "Money")-15000); GivePlayerWeapon(playerid,33,40);
    case 7: DOF2_SetInt(RFile(playerid),"Money", DOF2_GetInt(RFile(playerid), "Money")-12000); GivePlayerWeapon(playerid,34,50);}}
Reply
#2

Put braces around it, like every other block of code.
Reply
#3

Quote:
Originally Posted by Vince
Посмотреть сообщение
Put braces around it, like every other block of code.
Thanks
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)