Strcat - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Strcat (
/showthread.php?tid=448985)
Strcat -
Blackazur - 06.07.2013
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");
Re: Strcat -
CAR - 06.07.2013
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");
}
Re: Strcat -
arakuta - 06.07.2013
You can't place a set in a element (Mathematics).
But you can place a set inside a set
pawn Код:
case 8:
{
//Element
//Element
}