10.06.2011, 17:31
For some reason when i do /v buy i get unknown command for this part of my code
but when i do change str1 and the other strings to new str1[256]; i don't get unknown command.In wiki.sa-mp.com
it says that max string length is 1024.
Please can someone tell me or show me how to fix this thanks.Sorry for my bad english.
pawn Код:
new str1[1024];
new str2[1024];
new str3[1024];
new str4[1024];
new str5[1024];
new str6[1024];
new str7[1024];
if (PlayerInfo[playerid][pMember] == 1 && PlayerToPoint(30.0, playerid,2130.7195,-1147.0983,24.3918))
{
format(str1, sizeof str1, "Cop Car LS (42000) (596) Cop Car SF (43000) (597)\nCop Car LV (46000) (598) Ranger (48000) (599)\nFaggio (15000) (462), Freeway (28000) (463),PCJ-600 (55000) (461)\nMajestic (38000) (517), Tahoma (42000) (566)\nPicador (36000) (600), Voodoo (65000) (412)\nSabre (43000) (475), Buccaneer (36000) (518)");
format(str2, sizeof str2,"Bobcat (42000) (422), Mesa (45000) (500), Tornado (65000) (576)\nHuntley (89000) (579),Hermes (50000) (474), Greenwood (33000) (492), Blade (69000) (536), Merit (56000) (551) \n");
format(str3, sizeof str3,"Feltzer (89000) (533), Sentinel (69000) (405), Stratum (28000) (561),Washington (59000) (421)\n Broadway (75000) (575), Remmington (59000) (534) \n");
format(str4, sizeof str4, "Sunrise (35000) (550), Burrito (45000) (482), Glendale (35000) (466),Savanna (62000) (567)\nLandstalker (42000) (400), Slamvan (55000) (535), Yosemite (85000) (554) \n");
format(str5, sizeof str5, "Admiral (85000) (445), Virgo (34000) (491), Stafford (125000) (580)\nGlendale Shit (18000)(604), Camper (29000) (483), Super GT (250000) (506) \n");
format(str6, sizeof str6, "Hustler (125000) (545), Vincent (78000) (540), Blista Compact (38000) (496),Regina (26000) (479)\n Phoenix (310000) (603), Emperor (95000) (585), Tampa (58000) (549) \n");
format(str7, sizeof str7, "Primo (52000) (547), Intruder (45000) (546), Willard (36000) (529), Cadrona (48000) (527),Fortune (65000) (526)\nTaxi (50000) (420), Tow Truck (25000) (525), Nebula (59000) (516), Bike (1000) (509) \n");
format(string,sizeof(string),"%s\n%s\n%s\n%s\n%s\n%s\n%s",str1,str2,str3,str4,str5,str6,str7);
ShowPlayerDialog(playerid,1514,DIALOG_STYLE_MSGBOX,"Choose the type of the vehicles:",string,"Select","Leave");
}
}
it says that max string length is 1024.
Please can someone tell me or show me how to fix this thanks.Sorry for my bad english.