Little scripting question > Variables.
#1

Hi, i'm trying to do the following

When the player gets in the car, the vehicle's id is printed into "Vehid" variable:
pawn Код:
//TOP
new Vehid[MAX_VEHICLES];
//
new Vehicleid = GetPlayerVehicleID(playerid);
Vehid[Vehicleid] = Vehicleid(playerid);
And then, I wanna put the guy in that "Vehid", that must be the previous player's vehicle id:

pawn Код:
PutPlayerInVehicle(playerid, Vehid, 0);
And the problem is in Vehid:
Код:
error 035: argument type mismatch (argument 2)
Can someone tell me, WHY! Lol. Maybe making the "Vehid" a global variable. But, IT IS xD.
Reply
#2

Vehid[Vehicleid] = Vehicleid(playerid);
Shouldn't it be
Vehid[Vehicleid] = Vehicleid;
Reply
#3

Quote:
Originally Posted by |∞|-Рцппσĵσ-|∞|
Vehid[Vehicleid] = Vehicleid(playerid);
Shouldn't it be
Vehid[Vehicleid] = Vehicleid;
The same bug :S
Reply
#4

1. What line is the error on.

2. What callback do you use this in?
pawn Код:
new Vehicleid = GetPlayerVehicleID(playerid);
Vehid[Vehicleid] = Vehicleid(playerid);
3. What's "Vehicleid(playerid)" ?

4. Try this.
pawn Код:
Vehid[vehicleid] = GetPlayerVehicleID(playerid);
Reply
#5

What is the point of this?
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)