04.02.2012, 21:24
This is part of the function witch is called in OnDialogResponse callback.
The problem is that when I fill binaryPanels I lost contents of binaryDoors.
What is the problem ?
The problem is that when I fill binaryPanels I lost contents of binaryDoors.
What is the problem ?
Код:
new binaryDoors[32], binaryPanels[32], decimal, exponent = 1, j; GetVehicleDamageStatus(tveh+1, gVehData[tveh][CarPanels], gVehData[tveh][CarDoors], gVehData[tveh][CarLights], gVehData[tveh][CarTires]); for(j = 0; j < sizeof(binaryDoors); j++) { if(gVehData[tveh][CarDoors] & exponent) strins(binaryDoors, "1", 0, sizeof(binaryDoors)); else strins(binaryDoors, "0", 0, sizeof(binaryDoors)); exponent = (2 * exponent); } printf("1. binaryDoors = %s", binaryDoors); printf("1. binaryPanels = %s", binaryPanels); exponent = 1; for(j = 0; j < sizeof(binaryPanels); j++) { if(gVehData[tveh][CarPanels] & exponent) strins(binaryPanels, "1", 0, sizeof(binaryPanels)); else strins(binaryPanels, "0", 0, sizeof(binaryPanels)); exponent = (2 * exponent); } printf("2. binaryDoors = %s", binaryDoors); printf("2. binaryPanels = %s", binaryPanels);