Dialog error
#1

Hi, I'm making a dialog where the player can buy a weapon.

Код:
ShowPlayerDialog(playerid, 0, DIALOG_STYLE_LIST, "Choose a weapon", "9mm pistol\n" +
		"9mm pistol (silenced)\n" +
		"AK-47\n" +
		"Baseball bat\n" +
		"Brass knuckles\n" +
		"Camera\n" +
		"Chainsaw\n" +
		"Desert Eagle\n" +
		"Fire extinguisher\n" +
		"Flamethrower\n" +
		"Flower bouquet\n" +
		"Golf club\n" +
		"Graffiti spraycan\n" +
		"Handgrenade\n" +
		"Heat-seeking rocket launcher\n" +
		"Katana\n" +
		"Knife\n" +
		"M4\n" +
		"Minigun\n" +
		"Molotov cocktail\n" +
		"MP5\n" +
		"Night vision goggles\n" +
		"Nite stick\n" +
		"Parachute\n" +
		"Pool cue\n" +
		"Rifle\n" +
		"RPG\n" +
		"Satchel charge\n" +
		"Sawn-off shotgun\n" +
		"Shotgun\n" +
		"Shovel\n" +
		"Sniper rifle\n" +
		"SPAS-12\n" +
		"TEC-9\n" +
		"Uzi", "OK", "Cancel");
This code gives the following error:

Quote:

C:\Documents and Settings\Superthijs\Mijn documenten\SA-MP Windows Server\filterscripts\admin.pwn(419) : error 001: expected token: "-string end-", but found "-identifier-"

How can I fix this code?
Reply
#2

What is this "+" ?
pawn Код:
ShowPlayerDialog( playerid, 0, DIALOG_STYLE_LIST, "Choose a weapon", "9mm pistol\n9mm pistol (silenced)\nAK-47\nBaseball bat\n..continue", "OK", "Cancel");
Reply
#3

Thanks, but when I insert all weapons in a string, it says that the string is too long to be used...
Reply
#4

Then use strcat.
pawn Код:
new
    Msg[ 1024 ];

strcat( Msg, "1/3 from message here" );
strcat( Msg, "2/3 from message here" );
strcat( Msg, "3/3 from message here" );

ShowPlayerDialog( playerid, 0, DIALOG_STYLE_LIST, "Choose a weapon", Msg, "OK", "Cancel");
Reply
#5

Thanks a million!
Reply
#6

Dwane
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)