ShowPlayerDialog Please help
#1

Код:
""COL_CYAN"Shqiponjat-Gaming: Kerret By GrOobY (BETA)",
            	                               "Aston Martin - Alpha\n\
						Aston Martin DB5 - Windsor\n\
						Audi A7 - Sentinel\n\
						Audi S4 - Merit\n\
						Audi TT - Majestic\n\
						BMW X5 - Buffalo\n\
						BMW 7 - Washington\n\
						BMW M5 - Elegant\n\
						Marcopolo - Bus\n\
						Cadillac 62 - Buccanee\n\
						Cadillac ESV - Lanstal\n\
						Chevrolet Chevelle SS - Sabre\n\
						Chevrolet Camaro SSX - Phoenix\n\
						Chrysler 300 STR8 - Stafford\n\
						Citroen XSara 4x4 - Blistac\n\
						Dodge Carger - Sunrise\n\
						Dodge Challanger - Tampa\n\
						Ferrari 458 - Blade\n\
						Ford Mustang RTR-X - Hotring\n\
						Ford Mustang GT - Clover\n\
						Ford Flex - Rancher\n\
						Caterpillar - Flatbad\n\
						Hummer - Landstalker\n\
						Hyundai Genesis Coupe - Cadrona\n\
						Honda - Elegy\n\
						Shelby GT - Infernus\n\
						Jeep Grand Cheroke - Sandking\n\
						Lamborghini Aventador - Turismo\n\
						Lincoln Towncar Limo - Stretch\n\
						Masserati - Fortune\n\
						Mercedes - Admiral\n\
						Mitsubishi Lancer Ebolution - Empror\n\
						Mitsubishi Lancer Evolution X - Primo\n\
						Mitsubishi Eclipse - Manana\n\
						Nissan GTR35 - Super GT\n\
						Policia - ID 596\n\
						Policia Mercedes - ID 597\n\
						Policia SKODA - ID 598\n\
						Porche 911 - ID 502\n\
						ATV 50 - Quad\n\
						Rolls Royce Phantom - Feltzer\n\
						Volvo Truck - Bagbox\n\
						Toyota Supra - Euros\n\
						UAZ - Mesa\n\
						Golf 2 - Club\n\
						Volkswagen Buggy - BF Injection\n\
						Passat - Vincent",
						"OK", "Vazhdo");
	return true;
}
this problem
Код:
C:\Documents and Settings\GrOobY\Desktop\kerret.pwn(34 -- 54) : error 075: input line too long (after substitutions)
C:\Documents and Settings\GrOobY\Desktop\kerret.pwn(55) : warning 217: loose indentation
C:\Documents and Settings\GrOobY\Desktop\kerret.pwn(55) : error 017: undefined symbol "Aston"
C:\Documents and Settings\GrOobY\Desktop\kerret.pwn(55) : error 017: undefined symbol "Martin"
C:\Documents and Settings\GrOobY\Desktop\kerret.pwn(55) : error 029: invalid expression, assumed zero
C:\Documents and Settings\GrOobY\Desktop\kerret.pwn(55) : fatal error 107: too many error messages on one line

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


5 Errors.
help please
Reply
#2

Ya you'll need to use strcat to get a string that long I think.
Reply
#3

Quote:
Originally Posted by [uL]Pottus
Посмотреть сообщение
Ya you'll need to use strcat to get a string that long I think.
Its Include ?
Reply
#4

https://sampwiki.blast.hk/wiki/Strcat
Reply
#5

Quote:
Originally Posted by [uL]Pottus
Посмотреть сообщение
Give me full pawn code i'm new scripter please
Reply
#6

The problem is, all the new lines (the "\" after "\n") will compile to ONE line afterwards.
But, the PAWN Compiler has a limit how long one line can be.

So, you have to split the whole string up in 3 or 4 parts and bring them back together in one string.

Here:

Код:
new string[256];

strcat(string,
"Aston Martin - Alpha\n\
Aston Martin DB5 - Windsor\n\
Audi A7 - Sentinel\n\
Audi S4 - Merit\n\
Audi TT - Majestic\n\
BMW X5 - Buffalo\n\
BMW 7 - Washington\n\
BMW M5 - Elegant\n\
Marcopolo - Bus\n\
Cadillac 62 - Buccanee\n\
Cadillac ESV - Lanstal\n\
Chevrolet Chevelle SS - Sabre\n\
Chevrolet Camaro SSX - Phoenix\n\
Chrysler 300 STR8 - Stafford\n\
Citroen XSara 4x4 - Blistac\n\
Dodge Carger - Sunrise\n\
Dodge Challanger - Tampa\n\
Ferrari 458 - Blade\n");

strcat(string,
"Ford Mustang RTR-X - Hotring\n\
Ford Mustang GT - Clover\n\
Ford Flex - Rancher\
Caterpillar - Flatbad\n\
Hummer - Landstalker\n\
Hyundai Genesis Coupe - Cadrona\n\
Honda - Elegy\n\
Shelby GT - Infernus\n\
Jeep Grand Cheroke - Sandking\n\
Lamborghini Aventador - Turismo\n\
Lincoln Towncar Limo - Stretch\n\
Masserati - Fortune\n\
Mercedes - Admiral\n\
Mitsubishi Lancer Ebolution - Empror\n\
Mitsubishi Lancer Evolution X - Primo\n\
Mitsubishi Eclipse - Manana\n\
Nissan GTR35 - Super GT\n\
Policia - ID 596\n\
Policia Mercedes - ID 597\n\
Policia SKODA - ID 598\n\
Porche 911 - ID 502\n\
ATV 50 - Quad\n\
Rolls Royce Phantom - Feltzer\n\
Volvo Truck - Bagbox\n\
Toyota Supra - Euros\n\
UAZ - Mesa\n\
Golf 2 - Club\n\
Volkswagen Buggy - BF Injection\n\
Passat - Vincent");

ShowPlayerDialog(playerid, DIALOGID, DIALOG_STYLE_LIST, ""COL_CYAN"Shqiponjat-Gaming: Kerret By GrOobY (BETA)", string, "OK", "Vazhdo");
If the error still exist, split them again like I did.
If the string gets cut at the end, you have to higher the size of the string.
Reply
#7

Quote:
Originally Posted by NaS
Посмотреть сообщение
The problem is, all the new lines (the "\" after "\n") will compile to ONE line afterwards.
But, the PAWN Compiler has a limit how long one line can be.

So, you have to split the whole string up in 3 or 4 parts and bring them back together in one string.

Here:

Код:
new string[256];

strcat(string,
"Aston Martin - Alpha\n\
Aston Martin DB5 - Windsor\n\
Audi A7 - Sentinel\n\
Audi S4 - Merit\n\
Audi TT - Majestic\n\
BMW X5 - Buffalo\n\
BMW 7 - Washington\n\
BMW M5 - Elegant\n\
Marcopolo - Bus\n\
Cadillac 62 - Buccanee\n\
Cadillac ESV - Lanstal\n\
Chevrolet Chevelle SS - Sabre\n\
Chevrolet Camaro SSX - Phoenix\n\
Chrysler 300 STR8 - Stafford\n\
Citroen XSara 4x4 - Blistac\n\
Dodge Carger - Sunrise\n\
Dodge Challanger - Tampa\n\
Ferrari 458 - Blade\n");

strcat(string,
"Ford Mustang RTR-X - Hotring\n\
Ford Mustang GT - Clover\n\
Ford Flex - Rancher\
Caterpillar - Flatbad\n\
Hummer - Landstalker\n\
Hyundai Genesis Coupe - Cadrona\n\
Honda - Elegy\n\
Shelby GT - Infernus\n\
Jeep Grand Cheroke - Sandking\n\
Lamborghini Aventador - Turismo\n\
Lincoln Towncar Limo - Stretch\n\
Masserati - Fortune\n\
Mercedes - Admiral\n\
Mitsubishi Lancer Ebolution - Empror\n\
Mitsubishi Lancer Evolution X - Primo\n\
Mitsubishi Eclipse - Manana\n\
Nissan GTR35 - Super GT\n\
Policia - ID 596\n\
Policia Mercedes - ID 597\n\
Policia SKODA - ID 598\n\
Porche 911 - ID 502\n\
ATV 50 - Quad\n\
Rolls Royce Phantom - Feltzer\n\
Volvo Truck - Bagbox\n\
Toyota Supra - Euros\n\
UAZ - Mesa\n\
Golf 2 - Club\n\
Volkswagen Buggy - BF Injection\n\
Passat - Vincent");

ShowPlayerDialog(playerid, DIALOGID, DIALOG_STYLE_LIST, ""COL_CYAN"Shqiponjat-Gaming: Kerret By GrOobY (BETA)", string, "OK", "Vazhdo");
If the error still exist, split them again like I did.
If the string gets cut at the end, you have to higher the size of the string.
This Error :S

Код:
C:\Documents and Settings\GrOobY\My Documents\Downloads\kerret(1).pwn(34 -- 35) : error 029: invalid expression, assumed zero
C:\Documents and Settings\GrOobY\My Documents\Downloads\kerret(1).pwn(35) : error 017: undefined symbol "string"
C:\Documents and Settings\GrOobY\My Documents\Downloads\kerret(1).pwn(35) : warning 215: expression has no effect
C:\Documents and Settings\GrOobY\My Documents\Downloads\kerret(1).pwn(35) : error 001: expected token: ";", but found "]"
C:\Documents and Settings\GrOobY\My Documents\Downloads\kerret(1).pwn(35) : fatal error 107: too many error messages on one line

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


4 Errors.
this is line 35 new string[256];
Reply
#8

Show me the line above new string[256]; please.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)