01.03.2015, 18:05
Just leave these brackets empty if you use a predefined array
if you still get an error than you did something wrong afterwards
The problem is that you start with 1 in the second dimension, it should be
If your line is to long you could place it on an extra line
The line limit is around ~500 char, this will only raise it by a little
For really longs strings you should define them globally
if you still get an error than you did something wrong afterwards
pawn Код:
new Float:InteriorCoords[][] = {};
pawn Код:
SetPVarFloat(playerid,"HouseExitX", InteriorCoords[0][0]);
SetPVarFloat(playerid,"HouseExitY", InteriorCoords[0][1]);
SetPVarFloat(playerid,"HouseExitZ", InteriorCoords[0][2]);
pawn Код:
ShowPlayerDialog(playerid, 123, DIALOG_STYLE_LIST, "Houses",
"Small Cottage\nLight Living\nDirty Laundry\nFancy Apartment\nHouse Ghetto Small\nGhetto Project Apartment Small\nLS Trailer\nLong John\nApartment Near Beach Medium\nHuge House at Vinewood\nMedium House at SF\nSmall Project LV\nHallway House\nLight Apartment\nSmall Nice House in SF\nUgly but big\nShithole\nMinor Manor\nPink house in SF\n3 Story Condo in SF\n4 Story Condo in SF\nMajor Manor\nMexican Style House\nSimple House\nMadd Doggs House",
"Accept", "Cancel"
);
For really longs strings you should define them globally
pawn Код:
// strings must be placed right after each other
new
DialogText1[] = "Small Cottage\nLight Living\nDirty Laundry\nFancy Apartment\nHouse Ghetto Small\nGhetto Project Apartment Small\nLS Trailer\nLong John\nApartment Near Beach Medium\nHuge House at Vinewood\nMedium House at SF\nSmall Project LV",
DialogText2[] = "Hallway House\nLight Apartment\nSmall Nice House in SF\nUgly but big\nShithole\nMinor Manor\nPink house in SF\n3 Story Condo in SF\n4 Story Condo in SF\nMajor Manor\nMexican Style House\nSimple House\nMadd Doggs House"
);
// OnGameModeInit
// You could also write a simple function to conect these strings
DialogText2[sizeof DialogText2 - 1] = EOS; // this is necessary otherwise the compiler will ignore it as it is never used
DialogText1[sizeof DialogText1 - 1] = '\n'; // concact both strings with '\n' (we left that one away at the end of the first string)
// Your dialog
ShowPlayerDialog(playerid, 123, DIALOG_STYLE_LIST, "Houses", DialogText1, "Accept", "Cancel");

