[HELP] [PAWNO] - "error 055, error 010, and error 021"
#1

Hello, I have problem in PAWN. Can you Help me ?

This is the Error,


Код:
(35252) : error 055: start of function body without function header
(35253) : error 010: invalid function or declaration
(35255) : error 010: invalid function or declaration
(35257) : error 010: invalid function or declaration
(35258) : error 010: invalid function or declaration
(35260) : error 010: invalid function or declaration
(35262) : error 010: invalid function or declaration
(35264) : error 010: invalid function or declaration
(35265) : error 010: invalid function or declaration
(35268) : error 021: symbol already defined: "SetPlayerAttachedObject"
(35272) : error 010: invalid function or declaration
(35274) : error 010: invalid function or declaration
(35275) : error 010: invalid function or declaration
(35278) : error 021: symbol already defined: "SetPlayerAttachedObject"
(35283) : error 010: invalid function or declaration
(35285) : error 010: invalid function or declaration
(35286) : error 010: invalid function or declaration
(35289) : error 021: symbol already defined: "SetPlayerAttachedObject"
(35295) : error 010: invalid function or declaration
(35297) : error 010: invalid function or declaration
(35298) : error 010: invalid function or declaration
(35301) : error 021: symbol already defined: "SetPlayerAttachedObject"
(35309) : error 010: invalid function or declaration
(35317) : error 010: invalid function or declaration

Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase

24 Errors.
and This is the PAWN Code,

pawn Код:
{ //Line 35252
    switch( dialogid ) //Line 35253
    {
        case VToys: //Line 35255
        {
            if ( !response ) //Line 35257
            return 1; //Line 35258

            switch( listitem ) //Line 35260
            {
                case 0: //Line 35262
                {
                    for ( new i = 0; i < 5; i++ ) //Line 35264
                    if ( IsPlayerAttachedObjectSlotUsed( playerid, i ) ) //Line 35265
                    RemovePlayerAttachedObject( playerid, i );

                    SetPlayerAttachedObject( playerid, 1, 19086, 8, -0.049768, -0.014062, -0.108385, 87.458297, 263.478149, 184.123764, 0.622413, 1.041609, 1.012785 ); //Line 35268
                    SendClientMessage( playerid, "{FF0000}<!> {EEEEEE}You have Holded a {FF0000}Dick {EEEEEE}!" );
                    SendClientMessage( playerid, "{FF0000}<!> {EEEEEE}Use {FF0000}/stophold{EEEEEE}, If you wish to stop Holding Objects." );
                }
                case 1: //Line 35272
                {
                    for ( new i = 0; i < 5; i++ ) //Line 35274
                    if ( IsPlayerAttachedObjectSlotUsed( playerid, i ) ) //Line 35275
                    RemovePlayerAttachedObject( playerid, i );

                    SetPlayerAttachedObject( playerid, 0, 1114, 1, 0.138007, 0.002714, -0.157366, 350.942352, 16.794704, 32.683506, 0.791829, 0.471535, 1.032759 ); //Line 35278
                    SetPlayerAttachedObject( playerid, 1, 1114, 1, 0.138007, 0.002714, 0.064523, 342.729064, 354.099456, 32.369094, 0.791829, 0.471535, 1.032759 );
                    SendClientMessage( playerid, "{FF0000}<!> {EEEEEE}You have Holded an {FF0000}Iron {EEEEEE}!" );
                    SendClientMessage( playerid, "{FF0000}<!> {EEEEEE}Use {FF0000}/stophold{EEEEEE}, If you wish to stop Holding Objects." );
                }
                case 2: //Line 35283
                {
                    for ( new i = 0; i < 5; i++ ) //Line 35285
                    if ( IsPlayerAttachedObjectSlotUsed( playerid, i ) ) //Line 35286
                    RemovePlayerAttachedObject( playerid, i );

                    SetPlayerAttachedObject( playerid, 0, 18645, 2, 0.017478, 0.051500, 0.003912, 285.055511, 90.860740, 171.179550, 1.780549, 0.912008, 1.208514 ); //Line 35289
                    SetPlayerAttachedObject( playerid, 1, 18690, 2, -2.979508, 0.306475, -0.388553, 285.055511, 90.860740, 171.179550, 1.780549, 0.912008, 1.208514 );
                    SetPlayerAttachedObject( playerid, 2, 18716, 2, -2.979508, 0.306475, -0.388553, 285.055511, 90.860740, 171.179550, 1.780549, 0.912008, 1.208514 );
                    SendClientMessage( playerid, "{FF0000}<!> {EEEEEE}You have Holded as {FF0000}Alien {EEEEEE}!" );
                    SendClientMessage( playerid, "{FF0000}<!> {EEEEEE}Use {FF0000}/stophold{EEEEEE}, If you wish to stop Holding Objects." );
                }
                case 3: //Line 35295
                {
                    for ( new i = 0; i < 5; i++ ) //Line 35297
                    if ( IsPlayerAttachedObjectSlotUsed( playerid, i ) ) //Line 35298
                    RemovePlayerAttachedObject( playerid, i );

                    SetPlayerAttachedObject( playerid, 0, 18693, 5, 1.983503, 1.558882, -0.129482, 86.705787, 308.978118, 268.198822, 1.500000, 1.500000, 1.500000 ); //Line 35301
                    SetPlayerAttachedObject( playerid, 1, 18693, 6, 1.983503, 1.558882, -0.129482, 86.705787, 308.978118, 268.198822, 1.500000, 1.500000, 1.500000 );
                    SetPlayerAttachedObject( playerid, 2, 18703, 6, 1.983503, 1.558882, -0.129482, 86.705787, 308.978118, 268.198822, 1.500000, 1.500000, 1.500000 );
                    SetPlayerAttachedObject( playerid, 3, 18703, 5, 1.983503, 1.558882, -0.129482, 86.705787, 308.978118, 268.198822, 1.500000, 1.500000, 1.500000 );
                    SetPlayerAttachedObject( playerid, 4, 18965, 2, 0.111052, 0.021643, -0.000846, 92.280899, 92.752510, 358.071044, 1.200000, 1.283168, 1.200000 );
                    SendClientMessage( playerid, "{FF0000}<!> {EEEEEE}You have Holded as {FF0000}Incred {EEEEEE}!" );
                    SendClientMessage( playerid, "{FF0000}<!> {EEEEEE}Use {FF0000}/stophold{EEEEEE}, If you wish to stop Holding Objects." );
                }
                case 4: //Line 35309
                {
                    SetPlayerSpecialAction( playerid, 2 ); //Jetpack!
                    SendClientMessage( playerid, "{FF0000}<!> {EEEEEE}You have Spawned a {FF0000}JetPack {EEEEEE}!" );
                }
            }
        }
    }
    return 1; //Line 35317
}
Here are the Lines, I Listed it so you can easily read it,

Код:
(35252) = {
(35253) = switch( dialogid )
(35255) = case VToys:
(35257) = if ( !response )
(35258) = return 1;
(35260) = switch( listitem )
(35262) = case 0:
(35264) = for ( new i = 0; i < 5; i++ )
(35265) = if ( IsPlayerAttachedObjectSlotUsed( playerid, i ) )
(35268) = SetPlayerAttachedObject( playerid, 1, 19086, 8, -0.049768, -0.014062, -0.108385, 87.458297, 263.478149, 184.123764, 0.622413, 1.041609, 1.012785 );
(35272) = case 1:
(35274) = for ( new i = 0; i < 5; i++ )
(35275) = if ( IsPlayerAttachedObjectSlotUsed( playerid, i ) )
(35278) = SetPlayerAttachedObject( playerid, 0, 1114, 1, 0.138007, 0.002714, -0.157366, 350.942352, 16.794704, 32.683506, 0.791829, 0.471535, 1.032759 );
(35283) = case 2:
(35285) = for ( new i = 0; i < 5; i++ )
(35286) = if ( IsPlayerAttachedObjectSlotUsed( playerid, i ) )
(35289) = SetPlayerAttachedObject( playerid, 0, 18645, 2, 0.017478, 0.051500, 0.003912, 285.055511, 90.860740, 171.179550, 1.780549, 0.912008, 1.208514 );
(35295) = case 3:
(35297) = for ( new i = 0; i < 5; i++ )
(35298) = if ( IsPlayerAttachedObjectSlotUsed( playerid, i ) )
(35301) = SetPlayerAttachedObject( playerid, 0, 18693, 5, 1.983503, 1.558882, -0.129482, 86.705787, 308.978118, 268.198822, 1.500000, 1.500000, 1.500000 );
(35309) = case 4:
(35317) = return 1;
Can Someone Help Me ?, Please

- SAMProductions
Reply
#2

start of function body without function header - it means you forget to write forward YOur_function_name(params); check for it n check which function you forget to forward .. n forward it..
Reply
#3

Can you show us the 3 lines above?
pawn Код:
switch( dialogid )
Reply
#4

Can you please arrange it to me, i dont know what to do
Reply
#5

I meant to show us the lines 35249-35252.
Reply
#6

show us code lines above first error line
Reply
#7

pawn Код:
if(dialogid == DIALOG_PAINTJOBS)
    {
        if(response)
        {
            switch(listitem)
            {
                case 0:
                {
                    ChangeVehiclePaintjob(GetPlayerVehicleID(playerid), 0);
                    PlaySound(playerid, 1134);
                }
                case 1:
                {
                    ChangeVehiclePaintjob(GetPlayerVehicleID(playerid), 1);
                    PlaySound(playerid, 1134);
                }
                case 2:
                {
                    ChangeVehiclePaintjob(GetPlayerVehicleID(playerid), 2);
                    PlaySound(playerid, 1134);
                }
                case 3:
                {
                    ChangeVehiclePaintjob(GetPlayerVehicleID(playerid), 3);
                    PlaySound(playerid, 1134);
                }
            }
        }
        else if(!response) return cmd_pimp(playerid, "");
    }
    return 1; //Line 35249
}
{ //Line 35252
    switch( dialogid ) //Line 35253
    {
        case VToys: //Line 35255
        {
            if ( !response ) //Line 35257
            return 1; //Line 35258

            switch( listitem ) //Line 35260
            {
                case 0: //Line 35262
                {
                    for ( new i = 0; i < 5; i++ ) //Line 35264
                    if ( IsPlayerAttachedObjectSlotUsed( playerid, i ) ) //Line 35265
                    RemovePlayerAttachedObject( playerid, i );

                    SetPlayerAttachedObject( playerid, 1, 19086, 8, -0.049768, -0.014062, -0.108385, 87.458297, 263.478149, 184.123764, 0.622413, 1.041609, 1.012785 ); //Line 35268
                    SendClientMessage( playerid, "{FF0000}<!> {EEEEEE}You have Holded a {FF0000}Dick {EEEEEE}!" );
                    SendClientMessage( playerid, "{FF0000}<!> {EEEEEE}Use {FF0000}/stophold{EEEEEE}, If you wish to stop Holding Objects." );
                }
                case 1: //Line 35272
                {
                    for ( new i = 0; i < 5; i++ ) //Line 35274
                    if ( IsPlayerAttachedObjectSlotUsed( playerid, i ) ) //Line 35275
                    RemovePlayerAttachedObject( playerid, i );

                    SetPlayerAttachedObject( playerid, 0, 1114, 1, 0.138007, 0.002714, -0.157366, 350.942352, 16.794704, 32.683506, 0.791829, 0.471535, 1.032759 ); //Line 35278
                    SetPlayerAttachedObject( playerid, 1, 1114, 1, 0.138007, 0.002714, 0.064523, 342.729064, 354.099456, 32.369094, 0.791829, 0.471535, 1.032759 );
                    SendClientMessage( playerid, "{FF0000}<!> {EEEEEE}You have Holded an {FF0000}Iron {EEEEEE}!" );
                    SendClientMessage( playerid, "{FF0000}<!> {EEEEEE}Use {FF0000}/stophold{EEEEEE}, If you wish to stop Holding Objects." );
                }
                case 2: //Line 35283
                {
                    for ( new i = 0; i < 5; i++ ) //Line 35285
                    if ( IsPlayerAttachedObjectSlotUsed( playerid, i ) ) //Line 35286
                    RemovePlayerAttachedObject( playerid, i );

                    SetPlayerAttachedObject( playerid, 0, 18645, 2, 0.017478, 0.051500, 0.003912, 285.055511, 90.860740, 171.179550, 1.780549, 0.912008, 1.208514 ); //Line 35289
                    SetPlayerAttachedObject( playerid, 1, 18690, 2, -2.979508, 0.306475, -0.388553, 285.055511, 90.860740, 171.179550, 1.780549, 0.912008, 1.208514 );
                    SetPlayerAttachedObject( playerid, 2, 18716, 2, -2.979508, 0.306475, -0.388553, 285.055511, 90.860740, 171.179550, 1.780549, 0.912008, 1.208514 );
                    SendClientMessage( playerid, "{FF0000}<!> {EEEEEE}You have Holded as {FF0000}Alien {EEEEEE}!" );
                    SendClientMessage( playerid, "{FF0000}<!> {EEEEEE}Use {FF0000}/stophold{EEEEEE}, If you wish to stop Holding Objects." );
                }
                case 3: //Line 35295
                {
                    for ( new i = 0; i < 5; i++ ) //Line 35297
                    if ( IsPlayerAttachedObjectSlotUsed( playerid, i ) ) //Line 35298
                    RemovePlayerAttachedObject( playerid, i );

                    SetPlayerAttachedObject( playerid, 0, 18693, 5, 1.983503, 1.558882, -0.129482, 86.705787, 308.978118, 268.198822, 1.500000, 1.500000, 1.500000 ); //Line 35301
                    SetPlayerAttachedObject( playerid, 1, 18693, 6, 1.983503, 1.558882, -0.129482, 86.705787, 308.978118, 268.198822, 1.500000, 1.500000, 1.500000 );
                    SetPlayerAttachedObject( playerid, 2, 18703, 6, 1.983503, 1.558882, -0.129482, 86.705787, 308.978118, 268.198822, 1.500000, 1.500000, 1.500000 );
                    SetPlayerAttachedObject( playerid, 3, 18703, 5, 1.983503, 1.558882, -0.129482, 86.705787, 308.978118, 268.198822, 1.500000, 1.500000, 1.500000 );
                    SetPlayerAttachedObject( playerid, 4, 18965, 2, 0.111052, 0.021643, -0.000846, 92.280899, 92.752510, 358.071044, 1.200000, 1.283168, 1.200000 );
                    SendClientMessage( playerid, "{FF0000}<!> {EEEEEE}You have Holded as {FF0000}Incred {EEEEEE}!" );
                    SendClientMessage( playerid, "{FF0000}<!> {EEEEEE}Use {FF0000}/stophold{EEEEEE}, If you wish to stop Holding Objects." );
                }
                case 4: //Line 35309
                {
                    SetPlayerSpecialAction( playerid, 2 ); //Jetpack!
                    SendClientMessage( playerid, "{FF0000}<!> {EEEEEE}You have Spawned a {FF0000}JetPack {EEEEEE}!" );
                }
            }
        }
    }
    return 1; //Line 35317
}
Reply
#8

Thats the Code Above First Error Line.
Reply
#9

It compiles to me if I change:
pawn Код:
SendClientMessage( playerid, "{FF0000}<!> ...blabla..
to:
pawn Код:
SendClientMessage( playerid, -1, "{FF0000}<!> ...blabla..
It needs the color as second parameter.

I'm sure that there's an issue with whatever exists above OnDialogResponse callback. Make sure it closes and the OnDialogResponse is OUT of any callback.
Reply
#10

Still give me the same Error
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)