30.03.2011, 14:04
I need some help with arithmetic as im having some troubles coding my script.... lets start explain.
I want to do it
Ok... looks alright but look now my code
Ok here is the bug when i try to increment the Insurances it decreases the insurances by one and if i try again it will increase and the bug stops so at first time of the use of the command will decrease.
Now the Iprice when i try to increment more 500 to the variable it does it it sets the Iprice to 500 and at the second time sets to 1000 them 1500 , 2000, 2500 etc, and the default value was 1000.
So something is wrong because at the first time of the use of the cmd it decreases the the value "1" and "500" sets to 500.
Hope someone is good with arithmetic because I'm needing of help to fix this out.
I want to do it
pawn Код:
new a1,a2;
a1 = 1;
a2= 1000;
a1 = (a1 +1); //input = 2
a2 = (a2 +500); // input = 1500
pawn Код:
vehicleinfo[carkey][Insurances] = (vehicleinfo[carkey][Insurances] +1);
vehicleinfo[carkey][IPrice] = (vehicleinfo[carkey][IPrice] +500);
Now the Iprice when i try to increment more 500 to the variable it does it it sets the Iprice to 500 and at the second time sets to 1000 them 1500 , 2000, 2500 etc, and the default value was 1000.
So something is wrong because at the first time of the use of the cmd it decreases the the value "1" and "500" sets to 500.
Hope someone is good with arithmetic because I'm needing of help to fix this out.