Why get errors when compile this script ?
#1

PHP код:
CMD:vip(playeridparams[])
{
    
ShowPlayerDialog(playeridDIALOG_VIPDIALOG_STYLE_MSGBOX"V.I.P features""{00FF00}2 Level V.I.P:\n{FF0000}When you die, you dont lose money\n{FF0000}When you kill someone you get 1000$\n{FF0000}[V.I.P] Prefix\n{FF0000}/vtune to tune your car\n{00FF00}1 Level V.I.P:\n{FF0000}When you die, you dont lose money\n{FF0000}[V.I.P] Prefix\n{FF0000}vcolor CMD to change the color of your car\n{FF0000}vnos CMD to add 10x nitro to your car\n{FF0000}low CMD - To go to Lowriders tune garage\n{FF0000} trans CMD - To go to Transfender tune garage\n {FF0000}arch CMD - To go to ARCH tune garage""OK""Close");
    return 
1;

i get:
PHP код:
error 075input line too long (after substitutions)
error 037invalid string (possibly non-terminated string)
 
error 029invalid expressionassumed zero
error 029
invalid expressionassumed zero 
Reply
#2

The line is too long, use a dialog string with strcat
Reply
#3

pawn Код:
CMD:vip(playerid, params[])
{
    new string[256];
    strcat(string, "{00FF00}2 Level V.I.P:\n{FF0000}When you die, you dont lose money\n{FF0000}When you kill someone you get 1000$\n{FF0000}[V.I.P] Prefix\n{FF0000}/vtune to tune your car");
    strcat(string, "\n{00FF00}1 Level V.I.P:\n{FF0000}When you die, you dont lose money\n{FF0000}[V.I.P] Prefix\n{FF0000}vcolor CMD to change the color of your car\n{FF0000}vnos CMD to add 10x nitro to your car");
        strcat(string, "\n{FF0000}low CMD - To go to Lowriders tune garage\n{FF0000} trans CMD - To go to Transfender tune garage\n {FF0000}arch CMD - To go to ARCH tune garage");
    ShowPlayerDialog(playerid, DIALOG_VIP, DIALOG_STYLE_MSGBOX,string,"Close","OK");
    return 1;
}
Reply
#4

But now have only "OK" button and all is bugged
Reply
#5

Why string[256]; ?
The dialog's text is way more than 256 chatacters, try a bigger number like 500.
Edit for post below: Np, you are welcome.
Reply
#6

Thanks Dragonsaurus
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)