Why get errors when compile this script ? - 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: Why get errors when compile this script ? (
/showthread.php?tid=462226)
Why get errors when compile this script ? -
bustern - 05.09.2013
PHP код:
CMD:vip(playerid, params[])
{
ShowPlayerDialog(playerid, DIALOG_VIP, DIALOG_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 075: input line too long (after substitutions)
error 037: invalid string (possibly non-terminated string)
error 029: invalid expression, assumed zero
error 029: invalid expression, assumed zero
Re: Why get errors when compile this script ? -
DanishHaq - 05.09.2013
The line is too long, use a dialog string with strcat
Re: Why get errors when compile this script ? -
SeniorGamer - 05.09.2013
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;
}
Re: Why get errors when compile this script ? -
bustern - 06.09.2013
But now have only "OK" button and all is bugged
Re: Why get errors when compile this script ? -
Dragonsaurus - 06.09.2013
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.
Re: Why get errors when compile this script ? -
bustern - 06.09.2013
Thanks Dragonsaurus