Variable loosing content
#1

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 ?

Код:
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);
Reply


Messages In This Thread
Variable loosing content - by Xamxe - 04.02.2012, 21:24
Re: Variable loosing content - by Xamxe - 04.02.2012, 23:22
Re: Variable loosing content - by ғαιιοцт - 04.02.2012, 23:40
Re: Variable loosing content - by Xamxe - 04.02.2012, 23:49
Re: Variable loosing content - by ғαιιοцт - 05.02.2012, 00:08
Re: Variable loosing content - by MP2 - 05.02.2012, 00:55
AW: Re: Variable loosing content - by Nero_3D - 05.02.2012, 00:59
Re: Variable loosing content - by ғαιιοцт - 05.02.2012, 08:08

Forum Jump:


Users browsing this thread: 1 Guest(s)