array help
#1

Код:
new licenseplates[6] = { {"U76T 989"}, {"25ER OP2"}, {"6H7N UI9"}, {"GAY1 ONE"}, {"HAS1 ALT"}, {"U232 OPE"} };
i get this error on that line and i dont see the problem
fugitiveSFv2.0.pwn(226) : error 008: must be a constant expression; assumed zero



you may need this
Код:
for(new h = 0; h < sizeof(HouseInfo); h++)
	{
		if (gdebug >= 1){printf("HouseInfo[%d][hVec] %d",h,HouseInfo[h][hVec]);}
		CreateVehicle(HouseInfo[h][hVec], HouseInfo[h][hVecx], HouseInfo[h][hVecy], HouseInfo[h][hVecz], HouseInfo[h][hVecr], HouseInfo[h][hVcol1], HouseInfo[h][hVcol2], -1);
		gCarLock[h+1] = 0;
        new prand = random(sizeof(licenseplates));
        SetVehicleNumberPlate(h+1, licenseplates[prand]);
	}
Reply
#2

On top of your script
pawn Код:
new licenseplates[][] =
{
      {"U76T 989"},
      {"25ER 0F2"},
      {},
       // So on and so forth, remember, the last license plate should not have a "," at the end ;)
};
Reply
#3

Код:
new licenseplates[][] = {"U76T 989","25ER 0F2","and so on"};
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)