Quote:
Originally Posted by weedxd
Aight so you mean it like this ?
If so then i have problem.
PHP код:
case 12: // Normal Vehicles
{
new string[256];
strcat(string, "\nPhoenix ($125,000)\nzr350 ($125,000)\nPremier ($90,000)\nAlpha ($85,000)\nElegant ($80,000)\nStafford ($80,000)\nWashington ($70,000)\nHustler ($55,000)\nSabre ($50,000)\nBlista Compact ($50,000)\nAdmiral ($50,000)\nYosemite ($45,000)");
strcat(string, "\nFeltzer ($45,000)\nMerit ($40,000)\nVincent ($40,000)\nBuccaneer ($40,000)\nClub ($40,000)\nTahoma ($40,000)\nSunrise ($40,000)\nGreenwood ($40,000)\nSentinel ($40,000)\nOceanic ($35,000)\nBurrito ($35,000)\nMajestic ($30,000)\nNebula ($30,000)");
strcat(string, "\nVirgo ($30,000)\nGlendale ($30,000)\nSolair ($30,000)\nManana ($25,000)\nRegina ($25,000)\nSadler ($20,000)\nWalton ($15,000)\nClover ($5,000)\nTampa ($5,000)");
ShowPlayerDialog(playerid, 12, DIALOG_STYLE_LIST, "Normal Vehicles", string, "Choose", "Cancel");
}
How to fix this ?
PHP код:
C:\Users\WeeD\Desktop\HTLS-RP\gamemodes\HTLS-RP.pwn(32794) : warning 219: local variable "string" shadows a variable at a preceding level
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
|
That code should work perfectly.
pawn Код:
case 12: // Normal Vehicles
{
new str2[650];
strcat(str2, "\nPhoenix ($125,000)\nzr350 ($125,000)\nPremier ($90,000)\nAlpha ($85,000)\nElegant ($80,000)\nStafford ($80,000)\nWashington ($70,000)\nHustler ($55,000)\nSabre ($50,000)\nBlista Compact ($50,000)\nAdmiral ($50,000)\nYosemite ($45,000)");
strcat(str2, "\nFeltzer ($45,000)\nMerit ($40,000)\nVincent ($40,000)\nBuccaneer ($40,000)\nClub ($40,000)\nTahoma ($40,000)\nSunrise ($40,000)\nGreenwood ($40,000)\nSentinel ($40,000)\nOceanic ($35,000)\nBurrito ($35,000)\nMajestic ($30,000)\nNebula ($30,000)");
strcat(str2, "\nVirgo ($30,000)\nGlendale ($30,000)\nSolair ($30,000)\nManana ($25,000)\nRegina ($25,000)\nSadler ($20,000)\nWalton ($15,000)\nClover ($5,000)\nTampa ($5,000)");
ShowPlayerDialog(playerid, 12, DIALOG_STYLE_LIST, "Normal Vehicles", str2, "Choose", "Cancel");
}
I've also incremented the array size, 256 is too small for such large text.