27.05.2013, 22:55
(
Последний раз редактировалось PROJECTO; 22.04.2014 в 17:14.
)
Reparado
new carga1[MAX_PLAYERS];
#undef MAX_PLAYERS
#define MAX_PLAYERS 500
new auto[MAX_PLAYERS];//sea visible para todos los jugadores
auto = GetPlayerVehicleID(playerid);//extrae la id del vehiculo
if(auto > 403)//ID del vehiculo
{
//funciones
}
.pwn(6935) : error 035: argument type mismatch (argument 1)
.pwn(6936) : error 035: argument type mismatch (argument 1) .pwn(6937) : error 035: argument type mismatch (argument 1) .pwn(9676) : error 033: array must be indexed (variable "carga1") .pwn(9677) : error 033: array must be indexed (variable "carga2") .pwn(967 : error 033: array must be indexed (variable "carga3") .pwn(39796) : error 035: argument type mismatch (argument 1) .pwn(39797) : error 035: argument type mismatch (argument 1) .pwn(3979 : error 035: argument type mismatch (argument 1) Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 9 Errors. |
for(new i = 0; i <= MAX_PLAYERS; i++)//Significa que podrа ser enviado y utilizado por todos los jugadores.
{
//funciones
}
for(new i = 0; i <= MAX_PLAYERS; i++)
{
new carga1;
carga1 = CreateObject( 1685,0,0,0,0,0,0,80 );
AttachObjectToVehicle( carga1,GetPlayerVehicleID(playerid), 0.000000, 1.300000, 0.400000, 0.000000, 0.000000, 0.000000 );
}
Intenta poniendo el cтdigo haci:
pawn Код:
pawn Код:
|
//ya que antes creamos la variable new carga1[MAX_PLAYERS];
carga1[playerid] = CreateObject( 1685,0,0,0,0,0,0,80 );
AttachObjectToVehicle( carga1[playerid],GetPlayerVehicleID(playerid), 0.000000, 1.300000, 0.400000, 0.000000, 0.000000, 0.000000 );
DestroyObject(carga1[playerid]);
// y si lo usas en una callback sin parametros
for(new x=0;x<MAX_PLAYERS;x++)
carga1[x] = CreateObject(...)
new carga1[MAX_PLAYERS];
carga1[playerid] = CreateObject( 1685,0,0,0,0,0,0,80 );
AttachObjectToVehicle( carga1[playerid],GetPlayerVehicleID(playerid), 0.000000, 1.300000, 0.400000, 0.000000, 0.000000, 0.000000 );
DestroyObject(carga1[playerid]);
for(new x=0;x<MAX_PLAYERS;x++)
carga1[x] = CreateObject( 1685,0,0,0,0,0,0,80 );
// y para destruir
for(new x=0;x<MAX_PLAYERS;x++)
DestroyObject(carga1[x]);