06.07.2013, 17:40
Hello, i think i have an bracket error on this line: case DIALOG_BUY_CLASSES: it show me this errors:
error 014: invalid statement; not in switch
warning 215: expression has no effect
error 001: expected token: ";", but found ":"
error 029: invalid expression, assumed zero
fatal error 107: too many error messages on one line
Can you help me, please?
error 014: invalid statement; not in switch
warning 215: expression has no effect
error 001: expected token: ";", but found ":"
error 029: invalid expression, assumed zero
fatal error 107: too many error messages on one line
Код:
case DIALOG_BUY_CLASSES: { if(response) { if(team[playerid] == TEAM_HUMAN) { if(pInfo[playerid][SkinChanges] >= 1) { switch(listitem) { case 0: if(pInfo[playerid][pCookies] >= 10) pInfo[playerid][pCookies] -= 10,pInfo[playerid][SkinChanges] -= 1,pInfo[playerid][pHumanClass] = 0,pInfo[playerid][pHumanClass] = ENGINEER,setClass(playerid); else { SendCookieError(playerid,10); } case 1: if(pInfo[playerid][pCookies] >= 10) pInfo[playerid][pCookies] -= 10,pInfo[playerid][SkinChanges] -= 1,pInfo[playerid][pHumanClass] = 0,pInfo[playerid][pHumanClass] = SWAT,setClass(playerid); else { SendCookieError(playerid,10); } case 2: if(pInfo[playerid][pCookies] >= 50) pInfo[playerid][pCookies] -= 50,pInfo[playerid][SkinChanges] -= 1,pInfo[playerid][pHumanClass] = 0,pInfo[playerid][pHumanClass] = HEAVYSHOTGUN,setClass(playerid); else { SendCookieError(playerid,50); } case 3: if(pInfo[playerid][pCookies] >= 10) pInfo[playerid][pCookies] -= 10,pInfo[playerid][SkinChanges] -= 1,pInfo[playerid][pHumanClass] = 0,pInfo[playerid][pHumanClass] = ADVANCEDMEDIC,setClass(playerid); else { SendCookieError(playerid,10); } case 4: if(pInfo[playerid][pCookies] >= 15) pInfo[playerid][pCookies] -= 15,pInfo[playerid][SkinChanges] -= 1,pInfo[playerid][pHumanClass] = 0,pInfo[playerid][pHumanClass] = ADVANCEDENGINEER,setClass(playerid); else { SendCookieError(playerid,15); } case 5: if(pInfo[playerid][pCookies] >= 15) pInfo[playerid][pCookies] -= 15,pInfo[playerid][SkinChanges] -= 1,pInfo[playerid][pHumanClass] = 0,pInfo[playerid][pHumanClass] = FEDERALAGENT,setClass(playerid); else { SendCookieError(playerid,15); } case 6: if(pInfo[playerid][pCookies] >= 100) pInfo[playerid][pCookies] -= 100,pInfo[playerid][SkinChanges] -= 1,pInfo[playerid][pHumanClass] = 0,pInfo[playerid][pHumanClass] = KICKBACK,setClass(playerid); else { SendCookieError(playerid,100); } case 7: if(pInfo[playerid][pCookies] >= 80) pInfo[playerid][pCookies] -= 15,pInfo[playerid][SkinChanges] -= 1,pInfo[playerid][pHumanClass] = 0,pInfo[playerid][pHumanClass] = ADVANCEDSCOUT,setClass(playerid); else { SendCookieError(playerid,80); } case 8: if(pInfo[playerid][pCookies] >= 20) pInfo[playerid][pCookies] -= 20,pInfo[playerid][SkinChanges] -= 1,pInfo[playerid][pHumanClass] = 0,pInfo[playerid][pHumanClass] = E_ENGINEER,setClass(playerid); else { SendCookieError(playerid,20); } case 9: if(pInfo[playerid][pCookies] >= 100) pInfo[playerid][pCookies] -= 100,pInfo[playerid][pHumanClass] = 0,pInfo[playerid][pHumanClass] = DOCTOR,setClass(playerid); else { SendCookieError(playerid,100); } } } else return SendClientMessage(playerid,-1,""chat""COL_RED" You are not allowed to change your class anymore!"); } else return SendClientMessage(playerid,-1,""chat""COL_LIGHTBLUE" You must be a human to buy weapons"); } } } } } return 1; }