SA-MP Forums Archive
ammu - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: ammu (/showthread.php?tid=273276)



ammu - tanush - 01.08.2011

Код:
D:\Users\Tanush\Desktop\SA-MP Server Stunt\gamemodes\stunt.pwn(4415) : error 075: input line too long (after substitutions)
D:\Users\Tanush\Desktop\SA-MP Server Stunt\gamemodes\stunt.pwn(4416) : error 037: invalid string (possibly non-terminated string)
D:\Users\Tanush\Desktop\SA-MP Server Stunt\gamemodes\stunt.pwn(4416) : error 017: undefined symbol "Brass"
D:\Users\Tanush\Desktop\SA-MP Server Stunt\gamemodes\stunt.pwn(4416) : error 017: undefined symbol "Knuckles"
D:\Users\Tanush\Desktop\SA-MP Server Stunt\gamemodes\stunt.pwn(4416) : fatal error 107: too many error messages on one line

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


5 Errors.
Код:
	if(pickupid == parachute) GivePlayerWeapon(playerid,46,9999);
	if(pickupid == ammubuy) ShowPlayerDialog(playerid,222,DIALOG_STYLE_LIST,"Weapons","Brass Knuckles $10000\nGolf Club $10000\nNite stick $10000\nKnife $10000\nBaseball bat $10000\nShovel $10000\nPool cue $10000\nKatana $10000\nChainsaw $10000\nPurple dildo $10000\nShort vibrator $10000\nLong vibrator $10000\nWhite dildo $10000\ndildo $10000\nFlowers $10000\nCane $10000\n9mm Pistol $100000\nSilenced pistol $100000\nDesert eagle $100000\nShotgun $100000\nSawn-off shotgun $100000\nCombat shotgun $100000\nMicro Uzi $100000\nMP5 $100000\nAk-47 $100000\nM4 $100000\nTec 9 $100000\nCamera $10000","Open","Close");



Re: ammu - Dr - 01.08.2011

Make the line into strings, example:
pawn Код:
new string1[150], string2[150], finalstring[256];
format(string1,sizeof(string1), "Brass Knuckles $10000\nGolf Club $10000\nNite stick $10000\nKnife $10000\nBaseball bat $10000\nShovel $10000\nPool cue $10000\nKatana $10000\nChainsaw $10000\nPurple dildo $10000\nShort vibrator $10000\nLong vibrator $10000\nWhite dildo $10000\ndildo $10000\n");
format(string2,sizeof(string2), "Flowers $10000\nCane $10000\n9mm Pistol $100000\nSilenced pistol $100000\nDesert eagle $100000\nShotgun $100000\nSawn-off shotgun $100000\nCombat shotgun $100000\nMicro Uzi $100000\nMP5 $100000\nAk-47 $100000\nM4 $100000\nTec 9 $100000\nCamera $10000");
format(finalstring, sizeof(finalstring), "%s%s",string1,string2);
ShowPlayerDialog(playerid,222,DIALOG_STYLE_LIST,"Weapons",finalstring,"Open","Close");
You do that because it is too long for one line...


Re: ammu - Onyx - 01.08.2011

Quote:
Originally Posted by Nero_3D
Посмотреть сообщение
and dont use format as format should only be used for formating!
This means that you exceeded permitted characters. Use a string function, like Strcat because, it's much faster.