03.09.2013, 20:11
Quote:
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 string gets cut at the end, you have to higher the size of the string. |
Код:
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.