SA-MP Forums Archive
How to fix this error? - 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: How to fix this error? (/showthread.php?tid=336674)



How to fix this error? - newbienoob - 23.04.2012

pawn Код:
C:\Documents and Settings\user\Desktop\samp\gamemodes\weapons.pwn(27) : error 075: input line too long (after substitutions)
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


1 Error.



Re: How to fix this error? - RollTi - 23.04.2012

Error Line?


Re: How to fix this error? - Roel - 23.04.2012

Show us line 27 of your weapons.pwn script.


Re: How to fix this error? - newbienoob - 23.04.2012

Sorry here

pawn Код:
ShowPlayerDialog(playerid,weapons,DIALOG_STYLE_LIST,"Buy Weapons","Brass Knuckles $10 \nGolf Club $10 \nNightstick $10 \nKnife $10 \nBaseball Bat $10 \nShovel $10 \nPool Cue $10 \nKatana $15 \nChainsaw $250 \nDildo $10 \nFlowers $5 \nCane $5 \nGrenade $500 \nMolotov Cocktail $500 \n9mm $1000 \nSilenced 9mm $2000 \nDesert Eagle $3000 \nShotgun $4000 \nSawnoff Shotgun $5000 \nCombat Shotgun $6000 \nMicro Uzi $7000 \nSMG $8000 \nAK-47 $9000 \nM4 $10000 \nTec-9 $11000 \nCountry Rifle $12000 \nSniper $15000 \nSpraycan $50 \nFire Extinguisher $300 \nParachute $1","Buy","Cancel");



Re: How to fix this error? - RollTi - 23.04.2012

use strcat


Re: How to fix this error? - gabitzu4ever - 23.04.2012

pawn Код:
ShowPlayerDialog(playerid,weapons,DIALOG_STYLE_LIST,"Buy Weapons","Brass Knuckles $10 \nGolf Club $10 \n\
Nightstick $10 \nKnife $10 \nBaseball Bat $10 \nShovel $10 \nPool Cue $10 \nKatana $15 \nChainsaw $250 \n\
Dildo $10 \nFlowers $5 \nCane $5 \nGrenade $500 \nMolotov Cocktail $500 \n9mm $1000 \nSilenced 9mm $2000 \n\
Desert Eagle $3000 \nShotgun $4000 \nSawnoff Shotgun $5000 \nCombat Shotgun $6000 \nMicro Uzi $7000 \n\
SMG $8000 \nAK-47 $9000 \nM4 $10000 \nTec-9 $11000 \nCountry Rifle $12000 \nSniper $15000 \nSpraycan $50 \n\
Fire Extinguisher $300 \nParachute $1"
,"Buy","Cancel");
try it


Re: How to fix this error? - newbienoob - 23.04.2012

Quote:
Originally Posted by RollTi
Посмотреть сообщение
use strcat
How?


Re: How to fix this error? - Roel - 23.04.2012

Quote:
Originally Posted by newbienoob
Посмотреть сообщение
Sorry here

pawn Код:
ShowPlayerDialog(playerid,weapons,DIALOG_STYLE_LIST,"Buy Weapons","Brass Knuckles $10 \nGolf Club $10 \nNightstick $10 \nKnife $10 \nBaseball Bat $10 \nShovel $10 \nPool Cue $10 \nKatana $15 \nChainsaw $250 \nDildo $10 \nFlowers $5 \nCane $5 \nGrenade $500 \nMolotov Cocktail $500 \n9mm $1000 \nSilenced 9mm $2000 \nDesert Eagle $3000 \nShotgun $4000 \nSawnoff Shotgun $5000 \nCombat Shotgun $6000 \nMicro Uzi $7000 \nSMG $8000 \nAK-47 $9000 \nM4 $10000 \nTec-9 $11000 \nCountry Rifle $12000 \nSniper $15000 \nSpraycan $50 \nFire Extinguisher $300 \nParachute $1","Buy","Cancel");
You list is to long, this may work.
You should put it in something like this:
pawn Код:
new linestring[2][556],totalstring[1024];
format(linestring[0],sizeof(linestring[0]),"Brass Knuckles $10 \nGolf Club $10 \nNightstick $10 \nKnife $10 \nBaseball Bat $10 \nShovel $10 \nPool Cue $10 \nKatana $15 \nChainsaw $250 \nDildo $10 \nFlowers $5 \nCane $5 \nGrenade $500");
format(linestring[1],sizeof(linestring[1]),"\nMolotov Cocktail $500 \n9mm $1000 \nSilenced 9mm $2000 \nDesert Eagle $3000 \nShotgun $4000 \nSawnoff Shotgun $5000 \nCombat Shotgun $6000 \nMicro Uzi $7000 \nSMG $8000 \nAK-47 $9000 \nM4 $10000 \nTec-9 $11000 \nCountry Rifle $12000 \nSniper $15000 \nSpraycan $50 \nFire Extinguisher $300 \nParachute $1");
format(totalstring,sizeof(totalstring),"%s%s",linestring[0],linestring[1]);

ShowPlayerDialog(playerid,weapons,DIALOG_STYLE_LIST,"Buy Weapons",totalstring,"Buy","Cancel");



Re: How to fix this error? - newbienoob - 23.04.2012

Quote:
Originally Posted by Roel
Посмотреть сообщение
You list is to long, this may work.
You should put it in something like this:
pawn Код:
new linestring[2][556],totalstring[1024];
format(linestring[0],sizeof(linestring[0]),"Brass Knuckles $10 \nGolf Club $10 \nNightstick $10 \nKnife $10 \nBaseball Bat $10 \nShovel $10 \nPool Cue $10 \nKatana $15 \nChainsaw $250 \nDildo $10 \nFlowers $5 \nCane $5 \nGrenade $500");
format(linestring[1],sizeof(linestring[1]),"\nMolotov Cocktail $500 \n9mm $1000 \nSilenced 9mm $2000 \nDesert Eagle $3000 \nShotgun $4000 \nSawnoff Shotgun $5000 \nCombat Shotgun $6000 \nMicro Uzi $7000 \nSMG $8000 \nAK-47 $9000 \nM4 $10000 \nTec-9 $11000 \nCountry Rifle $12000 \nSniper $15000 \nSpraycan $50 \nFire Extinguisher $300 \nParachute $1");
format(totalstring,sizeof(totalstring),"%s%s",linestring[0],linestring[1]);

ShowPlayerDialog(playerid,weapons,DIALOG_STYLE_LIST,"Buy Weapons",totalstring,"Buy","Cancel");
Код:
C:\Documents and Settings\user\Desktop\samp\gamemodes\weapon.pwn(94) : error 001: expected token: "]", but found "-integer value-"
C:\Documents and Settings\user\Desktop\samp\gamemodes\weapon.pwn(94) : warning 215: expression has no effect
C:\Documents and Settings\user\Desktop\samp\gamemodes\weapon.pwn(94) : error 001: expected token: ";", but found "]"
C:\Documents and Settings\user\Desktop\samp\gamemodes\weapon.pwn(94) : error 029: invalid expression, assumed zero
C:\Documents and Settings\user\Desktop\samp\gamemodes\weapon.pwn(94) : fatal error 107: too many error messages on one line

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


4 Errors.



Re: How to fix this error? - Roel - 23.04.2012

Quote:
Originally Posted by newbienoob
Посмотреть сообщение
Код:
C:\Documents and Settings\user\Desktop\samp\gamemodes\weapon.pwn(94) : error 001: expected token: "]", but found "-integer value-"
C:\Documents and Settings\user\Desktop\samp\gamemodes\weapon.pwn(94) : warning 215: expression has no effect
C:\Documents and Settings\user\Desktop\samp\gamemodes\weapon.pwn(94) : error 001: expected token: ";", but found "]"
C:\Documents and Settings\user\Desktop\samp\gamemodes\weapon.pwn(94) : error 029: invalid expression, assumed zero
C:\Documents and Settings\user\Desktop\samp\gamemodes\weapon.pwn(94) : fatal error 107: too many error messages on one line

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


4 Errors.
Wierd, can you post the line of the error, Because I cannot find the mistake inside my script.