Strcat
#1

Hello, i have some errors with this:
error 003: declaration of a local variable must appear in a compound block
error 029: invalid expression, assumed zero
warning 215: expression has no effect
error 001: expected token: ";", but found "]"
fatal error 107: too many error messages on one line
Код:
				
						case 8:  new classes[500]; if(pInfo[playerid][pCookies] >= 10) pInfo[playerid][pCookies] -= 0,strcat(classes,"{FF0000}Buy Classes with Cookies! {7AF162}(Human)","Engineer (10 Cookies)\nSWAT (35 Cookies)\nHeavy Shotgun (50 Cookies)\nAdvanced Medic (10 Cookies)\nAdvanced Engineer (15 Cookies)\nFederal Agent (65 Cookies)\nAdvanced Scout (80 Cookies)\nExperienced Engineer (20 Cookies)\nDoctor (100 Cookies)\nAssassin (150 Cookies)") else { SendCookieError(playerid,10); }
							ShowPlayerDialog(playerid,DIALOG_BUY_CLASSES,DIALOG_STYLE_LIST,"{00FF00}Player Colors",pc,"Select","Close");
Reply
#2

This might work?:
pawn Код:
case 8: {
        new classes[500];
        if(pInfo[playerid][pCookies] >= 10) {
             pInfo[playerid][pCookies] -= 0;
            strcat(classes,"{FF0000}Buy Classes with Cookies! {7AF162}(Human)","Engineer (10 Cookies)\nSWAT (35 Cookies)\nHeavy Shotgun (50 Cookies)\nAdvanced Medic (10 Cookies)\nAdvanced Engineer (15 Cookies)\nFederal Agent (65 Cookies)\nAdvanced Scout (80 Cookies)\nExperienced Engineer (20 Cookies)\nDoctor (100 Cookies)\nAssassin (150 Cookies)");
        else { SendCookieError(playerid,10); }
        ShowPlayerDialog(playerid,DIALOG_BUY_CLASSES,DIALOG_STYLE_LIST,"{00FF00}Player Colors",pc,"Select","Close");
    }
Reply
#3

You can't place a set in a element (Mathematics).

But you can place a set inside a set

pawn Код:
case 8:
{
    //Element
    //Element
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)