problem with errors
#1

hello,
i have this code:
pawn Код:
stock KelioZenklas_Parking( Float:x, Float:y, Float:z, Float:rz )
{
    new keliozenklo_id = CreateDynamicObject( 8548, x, y, z, 0.0, 0.0, rz );
    new Float:p[ 6 ];

    Zenklu_Pozicija( keliozenklo_id, -0.03, -0.05, 0.45, p[ 0 ], p[ 1 ], p[ 2 ] );
    Zenklu_Pozicija( keliozenklo_id, 0.5,   -0.06, 0.95, p[ 3 ], p[ 4 ], p[ 5 ] );

    CreateDynamicObject( 2986, p[ 0 ], p[ 1 ], p[ 2 ], 0,  90, rz-90 );
    CreateDynamicObject( 2986, p[ 3 ], p[ 4 ], p[ 5 ], 90, 90, rz-90 );

    SetDynamicObjectMaterial( keliozenklo_id, 0, 18646, "matcolours", "lightblue", 0xFF00CCFF );
    SetDynamicObjectMaterial( keliozenklo_id, 1, 18646, "matcolours", "grey" );
   
    SetDynamicObjectMaterialText( keliozenklo_id+1, 0, "P", 60, "Arial", 60, 1, 0xFFFFFFFF, 0, 1 );

    return keliozenklo_id;
}
stock Zenklu_Pozicija( objectid, Float:offset_x, Float:offset_y, Float:offset_z, &Float:x, &Float:y, &Float:z )
{
    new
        Float:object_px,
        Float:object_py,
        Float:object_pz,
        Float:object_rx,
        Float:object_ry,
        Float:object_rz
        ;

    GetDynamicObjectPos( objectid, object_px, object_py, object_pz );
    GetDynamicObjectRot( objectid, object_rx, object_ry, object_rz );

    new
        Float:cos_x = floatcos( object_rx, degrees ),
        Float:cos_y = floatcos( object_ry, degrees ),
        Float:cos_z = floatcos( object_rz, degrees ),
        Float:sin_x = floatsin( object_rx, degrees ),
        Float:sin_y = floatsin( object_ry, degrees ),
        Float:sin_z = floatsin( object_rz, degrees )
        ;

    x = object_px + offset_x * cos_y * cos_z - offset_x * sin_x * sin_y * sin_z - offset_y * cos_x * sin_z + offset_z * sin_y * cos_z + offset_z * sin_x * cos_y * sin_z;
    y = object_py + offset_x * cos_y * sin_z + offset_x * sin_x * sin_y * cos_z + offset_y * cos_x * cos_z + offset_z * sin_y * sin_z - offset_z * sin_x * cos_y * cos_z;
    z = object_pz - offset_x * cos_x * sin_y + offset_y * sin_x + offset_z * cos_x * cos_y;
}

stock KelioZenklai( )
{
    KelioZenklas_Parking( -2613.3671, -52.0077,  4.4259,  88.6068,  ); // (32019) line
    KelioZenklas_Parking( -2697.2238, -51.8040,  4.8281,  -93.0072  );
    KelioZenklas_Parking( -2391.8095, -76.5686,  35.6640, -179.3811 );
    KelioZenklas_Parking( -2362.4606, -21.6726,  35.6640, -88.8890  );
    KelioZenklas_Parking( -2189.2304, 310.9559,  35.6718, -179.6684 );
    KelioZenklas_Parking( -2261.6313, 161.1714,  35.6718, 89.6710   );
    KelioZenklas_Parking( -2120.4455, -450.3680, 35.8430, -91.4345  );
    KelioZenklas_Parking( -1996.9147, 208.6630,  28.0390, -92.8164  );
    KelioZenklas_Parking( -2137.4536, 355.0484,  35.6718, -89.1906  );
    KelioZenklas_Parking( -1991.5588, 548.3712,  35.5156, -94.2911  );
    KelioZenklas_Parking( -2559.1872, 579.8823,  14.9609, 2.1616    );
    KelioZenklas_Parking( -2599.9279, 679.8528,  28.3125, -101.3616 );
   
}
and it's looks fine but i get errors like this:

Quote:

(32019) : error 029: invalid expression, assumed zero
(32019) : warning 202: number of arguments does not match definition
(32019) : error 001: expected token: ",", but found ";"

Reply
#2

and which lines are those errors referring to?
Reply
#3

pawn Код:
stock KelioZenklai( )
{
    KelioZenklas_Parking( -2613.3671, -52.0077,  4.4259,  88.6068  ); // (32019) line
    KelioZenklas_Parking( -2697.2238, -51.8040,  4.8281,  -93.0072  );
    KelioZenklas_Parking( -2391.8095, -76.5686,  35.6640, -179.3811 );
    KelioZenklas_Parking( -2362.4606, -21.6726,  35.6640, -88.8890  );
    KelioZenklas_Parking( -2189.2304, 310.9559,  35.6718, -179.6684 );
    KelioZenklas_Parking( -2261.6313, 161.1714,  35.6718, 89.6710   );
    KelioZenklas_Parking( -2120.4455, -450.3680, 35.8430, -91.4345  );
    KelioZenklas_Parking( -1996.9147, 208.6630,  28.0390, -92.8164  );
    KelioZenklas_Parking( -2137.4536, 355.0484,  35.6718, -89.1906  );
    KelioZenklas_Parking( -1991.5588, 548.3712,  35.5156, -94.2911  );
    KelioZenklas_Parking( -2559.1872, 579.8823,  14.9609, 2.1616    );
    KelioZenklas_Parking( -2599.9279, 679.8528,  28.3125, -101.3616 );
   
}
You just left a , in that line
Reply
#4

Quote:
Originally Posted by xXmAn40100Xx
Посмотреть сообщение
pawn Код:
stock KelioZenklai( )
{
    KelioZenklas_Parking( -2613.3671, -52.0077,  4.4259,  88.6068  ); // (32019) line
    KelioZenklas_Parking( -2697.2238, -51.8040,  4.8281,  -93.0072  );
    KelioZenklas_Parking( -2391.8095, -76.5686,  35.6640, -179.3811 );
    KelioZenklas_Parking( -2362.4606, -21.6726,  35.6640, -88.8890  );
    KelioZenklas_Parking( -2189.2304, 310.9559,  35.6718, -179.6684 );
    KelioZenklas_Parking( -2261.6313, 161.1714,  35.6718, 89.6710   );
    KelioZenklas_Parking( -2120.4455, -450.3680, 35.8430, -91.4345  );
    KelioZenklas_Parking( -1996.9147, 208.6630,  28.0390, -92.8164  );
    KelioZenklas_Parking( -2137.4536, 355.0484,  35.6718, -89.1906  );
    KelioZenklas_Parking( -1991.5588, 548.3712,  35.5156, -94.2911  );
    KelioZenklas_Parking( -2559.1872, 579.8823,  14.9609, 2.1616    );
    KelioZenklas_Parking( -2599.9279, 679.8528,  28.3125, -101.3616 );
   
}
You just left a , in that line
silly me, thanks
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)