Command error - 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: Command error (
/showthread.php?tid=593251)
Command error -
TheDarkBlade - 03.11.2015
Код:
CMD:premium(playerid, params[])
{
if(gPlayerLogged[playerid] == 0) return SendClientMessage(playerid, COLOR_LIGHTRED, "You need to login first.");
if(IsPlayerConnected(playerid))
{
new string[556];
format(string,sizeof(string),"{ffffff} Pentru a achizitiona un cont premium ai nevoie de {ff0000}20 lei - 5 euro{ffffff}.\n{ff0000}De ce beneficiezi daca ai cont premium? Mai jos ai lista cu detaliile.{ffffff}\n1. Vei primi un slot in plus pentru masina.\n2. Vei avea acces la comanda [/music] din alhambra.\n3. Vei avea interesul 0.2.\n4. Vei primi 2 respect points la 5 ore pe server.\n5. Poti sa iti blochezi whisper-url [/togwhisper].\n6. Poti porni motorul vehiculelor de pe tasta 2.\n7. Poti sa iti repari masina odata la 30 min cu [/vipfix].");
ShowPlayerDialog(playerid, DIALOG_PREMIUM, DIALOG_STYLE_MSGBOX, "Premium account:", string, "Close", "");
}
return 1;
}
Код:
C:\Users\Alex\Desktop\Serioux RPG V0.5I\gamemodes\serioux2.pwn(18860) : error 075: input line too long (after substitutions)
C:\Users\Alex\Desktop\Serioux RPG V0.5I\gamemodes\serioux2.pwn(18861) : error 037: invalid string (possibly non-terminated string)
C:\Users\Alex\Desktop\Serioux RPG V0.5I\gamemodes\serioux2.pwn(18861) : error 017: undefined symbol "ffffff"
C:\Users\Alex\Desktop\Serioux RPG V0.5I\gamemodes\serioux2.pwn(18861) : warning 217: loose indentation
C:\Users\Alex\Desktop\Serioux RPG V0.5I\gamemodes\serioux2.pwn(18861) : error 017: undefined symbol "Pentru"
C:\Users\Alex\Desktop\Serioux RPG V0.5I\gamemodes\serioux2.pwn(18861) : fatal error 107: too many error messages on one line
Re: Command error -
Maximun - 03.11.2015
PHP код:
CMD:premium(playerid, params[])
{
if(gPlayerLogged[playerid] == 0) return SendClientMessage(playerid, COLOR_LIGHTRED, "You need to login first.");
if(IsPlayerConnected(playerid))
{
new string[556];
format(string,sizeof(string),"{FFFFFF} Pentru a achizitiona un cont premium ai nevoie de {FF0000}20 lei - 5 euro{FFFFFF}.\n{FF0000}De ce beneficiezi daca ai cont premium? Mai jos ai lista cu detaliile.{FFFFFF}\n1. Vei primi un slot in plus pentru masina.\n2. Vei avea acces la comanda [/music] din alhambra.\n3. Vei avea interesul 0.2.\n4. Vei primi 2 respect points la 5 ore pe server.\n5. Poti sa iti blochezi whisper-url [/togwhisper].\n6. Poti porni motorul vehiculelor de pe tasta 2.\n7. Poti sa iti repari masina odata la 30 min cu [/vipfix].");
ShowPlayerDialog(playerid, DIALOG_PREMIUM, DIALOG_STYLE_MSGBOX, "Premium account:", string, "Close", "");
}
return 1;
}
Re: Command error -
prineside - 03.11.2015
Line 18860 is too long. There's a limit of 512 characters at one line in PAWN compiler.
Possible solution - divide big line into smaller ones:
PHP код:
// As you are not using any other args in format(), simply concat two parts of string
new string[556];
strcat( string, "{ffffff} Pentru a achizitiona un cont premium ai nevoie de {ff0000}20 lei - 5 euro{ffffff}.\n{ff0000}De ce beneficiezi daca ai cont premium? Mai jos ai lista cu detaliile.{ffffff}\n" );
strcat( string, "1. Vei primi un slot in plus pentru masina.\n2. Vei avea acces la comanda [/music] din alhambra.\n3. Vei avea interesul 0.2.\n4. Vei primi 2 respect points la 5 ore pe server.\n5. Poti sa iti blochezi whisper-url [/togwhisper].\n6. Poti porni motorul vehiculelor de pe tasta 2.\n7. Poti sa iti repari masina odata la 30 min cu [/vipfix]." );
// ...