Help me with this!
#1

i'm getting this error while compiling how to fix:
Код:
#include <a_samp>
#include <zcmd>

#define DIALOG_BUY_WEAPONS 311

CMD:buyweapons (playerid, params[])
{
 ShowPlayerDialog(playerid, DIALOG_BUY_WEAPONS, DIALOG_STYLE_LIST, "                    ...:::Weapon-Shop:::...                 ", "{8080FF}Armour                               -   2000$\n{8080FF}Deagle                              -   1000$\n{8080FF}Shotgun                               -   2000$\n{8080FF}AK-47                              -   2000$\n{8080FF}9mm                               -   2000$\n{8080FF}M4                               -   2000$\n{8080FF}Spass12                              -   2000$\n{8080FF}Sawn-Off                               -   2000$\n{8080FF}Grenade                              -   2000$\n{8080FF}Uzi                               -   2000$\n{8080FF}MP5                              -   2000$\n", "Buy", "Cancel");
 return 1;
}
how to fix this

Код:
C:\Users\User\Documents\SA-MP script files\samp windows server\samp037_svr_R2-1-1_win32\filterscripts\Untitled3.pwn(7) : error 075: input line too long (after substitutions)
C:\Users\User\Documents\SA-MP script files\samp windows server\samp037_svr_R2-1-1_win32\filterscripts\Untitled3.pwn(8) : error 037: invalid string (possibly non-terminated string)
C:\Users\User\Documents\SA-MP script files\samp windows server\samp037_svr_R2-1-1_win32\filterscripts\Untitled3.pwn(8) : error 029: invalid expression, assumed zero
C:\Users\User\Documents\SA-MP script files\samp windows server\samp037_svr_R2-1-1_win32\filterscripts\Untitled3.pwn(8) : error 029: invalid expression, assumed zero
C:\Users\User\Documents\SA-MP script files\samp windows server\samp037_svr_R2-1-1_win32\filterscripts\Untitled3.pwn(8) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


5 Errors.
Reply
#2

Use strcat.
Reply
#3

plz tell me how idk what is that. gimme even a link of a tutorial
Reply
#4

I would suggest using the new DIALOG_STYLE_TABLIST, https://sampwiki.blast.hk/wiki/Dialog_Styles
Reply
#5

plz somebody help
Reply
#6

Quote:
Originally Posted by coool
Посмотреть сообщение
I would suggest using the new DIALOG_STYLE_TABLIST, https://sampwiki.blast.hk/wiki/Dialog_Styles
i mean help me with an example i tried wiki how but i cant understand
Reply
#7

Use a string for format and a destination string. Like
PHP код:
new string[128], desstring[500];
// Then Using format
format(stringsizeof(string),"...:::Weapon-Shop:::... \n\n");
// Using strcat
strcat(desstringstring);
format(stringsizeof(string),"{8080FF}Armour\t-\t2000$\n");
strcat(desstringstring);
// And so on......
// Then use ShowPlayerDialog like this
ShowPlayerDialog(playeridDIALOG_IDDIALOG_STYLE_LIST,"Weapons Shop"desstring,"Buy""Close"); 
That's it.
Thank You.
Reply
#8

Quote:
Originally Posted by TadePoleMG
Посмотреть сообщение
Use a string for format and a destination string. Like
PHP код:
new string[128], desstring[500];
// Then Using format
format(stringsizeof(string),"...:::Weapon-Shop:::... \n\n");
// Using strcat
strcat(desstringstring);
format(stringsizeof(string),"{8080FF}Armour\t-\t2000$\n");
strcat(desstringstring);
// And so on......
// Then use ShowPlayerDialog like this
ShowPlayerDialog(playeridDIALOG_IDDIALOG_STYLE_LIST,"Weapons Shop"desstring,"Buy""Close"); 
That's it.
Thank You.
he can use it directly:

strcat(desstring, "...:::Weapon-Shop:::... \n\n");
strcat(desstring, "{8080FF}Armour\t-\t2000$\n");

it is not necessary format(string....
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)