[POMOC] 4 Errora

Započeo Acke, Novembar 02, 2011, 21:07:07 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 2 gostiju pregledaju ovu temu.

Skripta koju koristim:Moj mod od 0
Detaljan opis problema:Pravio sam komandu /car i imam 4 errora: error 017: undefined symbol "P_DATA"
warning 215: expression has no effect
error 001: expected token: ";", but found "]"
error 029: invalid expression, assumed zero
fatal error 107: too many error messages on one line


Dio skripte:  Cela komanda:CMD:car(playerid, params[])
{
    if ( P_DATA[ playerid ][ P_Logged ] == 0)return SendError( playerid, "Uloguj se da bi mogao da koristis ovu komandu!");
    new tmp[ 256 ], tmp2[ 256 ], tmp3[ 256 ],Index;
tmp = strtok( params,Index ), tmp2 = strtok( params,Index ), tmp3 = strtok( params,Index );
if ( !strlen( tmp ) ) return SendUsage( playerid, "/car <Model ID/Name> <boja1> <boja2" );
new car, colour1, colour2;
if ( !IsNumeric( tmp ) ) car = GetVehicleModelIDFromName( tmp ); else car = strval( tmp );
if ( car < 400 || car > 611 ) return  SendError( playerid, "Pogresan Vozilo ID/Ime!" );
if ( !strlen( tmp2 ) ) colour1 = random( 126 ); else colour1 = strval( tmp2 );
if ( !strlen( tmp3 ) ) colour2 = random( 126 ); else colour2 = strval( tmp3 );
if ( P_DATA[ playerid ][ P_Car ] != -1 && !IsPlayerAdmin( playerid) ) CarDeleter( P_DATA[ playerid ][ P_Car ] );
new LVehicleID, Float:X, Float:Y, Float:Z, Float:A; GetPlayerPos( playerid, X, Y, Z ),GetPlayerFacingAngle( playerid, A );
LVehicleID = CreateVehicle( car, X+3,Y,Z, A, colour1, colour2, -1 ); LinkVehicleToInterior( LVehicleID, GetPlayerInterior( playerid ) );
P_DATA[ playerid ][ P_Car ] = LVehicleID;

    FormMessageForAllEx(playerid,COLOR_GREEN, "Igrac %s je spawnovao  \"%s\" (Model:%d) Boja (%d, %d) !",PlayerName2( playerid ),VehicleNames[ car - 400 ],car, colour1, colour2);

new string[ 256 ];
format( string, sizeof string, "Vozilo Spawnovano!~n~~n~\
                                ~b~~h~Ime: ~w~%s~n~\
                                ~b~~h~Model: ~w~%d~n~\
                                ~b~~h~Boja: ~w~%d,%d",VehicleNames[ car - 400 ],car, colour1, colour2 );
Info( playerid, string, 4000);
PutPlayerInVehicle( playerid, LVehicleID, 0 );
return 1;
}



Bio bih vam zahvalan ako pomognete :D
Rescpect for:Gagi,Denis_Lapi,C++

dragan12

Fali ti ono new P_DATA[MAX_PLAYERS][pa tu ono od enuma] (ono od enuma mislim ono enum tu nesto pise trazi po P_Logged ako ne mozes da se snadjes ;))