Storing 2 data's?

Hi guys.
Im having a situation here: i'm trying to store 2 data's in 1 SetTimerEx like this :

SetTimerEx("buyvehtime", 20000, false, "ii", playerid, TCarModel, c);

The "c" is defined on the command by this:
for(new c=0;c<MAX_VEHICLES;c++)
TCarModel is the model the player types in the command. It is a command to buy a car based on its id.

So the problem is when i forward both like this:

forward buyvehtime(playerid, TCarModel, c);

It only stores the first one wich is TCarModel and it doesnt take the "c" too. So when i come to the public:

public buyvehtime(playerid, TCarModel, c)

It just doesnt store the c. It has the TCarModel value but c is set as 0 and it isnt 0. Can someone help me plz?

i think TCarModel is global varriable and c is local varriable
TCarModel = c;

Do you even know, what are you doing?

i know what im doing... All i want to do is take those 2 variables and put them with the exact same value at the public buyvehtime... i just want to do that because i need them

PHP код:
SetTimerEx("buyvehtime"20000false"ii"playeridTCarModelc); // 3 parameters, only 2 "i"s

forward buyvehtime(playeridTCarModelc); // Also 3 expected parameters here
public buyvehtime(playeridTCarModelc)// And here too (3 parameters) 
SetTimerEx("buyvehtime", 20000, false, "iii", playerid, TCarModel, c); // 3 parameters requires 3 "i"s

wtf, rly you can use same variable, there no difference between variable names...
SetTimerEx("buyvehtime", 20000, false, "ii", playerid, ass1, ass2);

forward buyvehtime(playerid, ass200,ass201); // Also 3 expected parameters here
public buyvehtime(playerid, ass200,ass201)

Forum Jump:

Users browsing this thread: 1 Guest(s)