Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8836851
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T09:35:13+00:00 2026-06-14T09:35:13+00:00

I am trying to compile my C code but I’m getting this error, I’ve

  • 0

I am trying to compile my C code but I’m getting this error, I’ve have relooked at all the code and I can’t see what’s wrong, but I don’t know exactly what this error is as I have never seen it before, if anybody could help me, I would really apprecaite it.

C:\Users\Eahz\Desktop\scocl\workspace\xmc\/menu_functions.cpp(2034): error line: 2034 compiler: nested functions are disabled, use -fnested-functions to re-enable

The code at the line 2034 is this:

    void looped_functions(void){
    //player options
    SET_CHAR_INVINCIBLE(pPlayer,godmode);
    if(pprotection){
        uint pos[4];
        GET_POSITION_OF_ANALOGUE_STICKS(0,&pos[0],&pos[1],&pos[2],&pos[3]);
        if(pos[0] == 0 && pos[1] == 0)
            FREEZE_CHAR_POSITION(pPlayer,true);
        else
            FREEZE_CHAR_POSITION(pPlayer,false);
    }

    if(rocketpistol){
        if(IS_CHAR_IN_ANY_CAR(pPlayer)){
            GET_CAR_CHAR_IS_USING(pPlayer,&tmp);
            GET_CAR_MODEL(tmp,&model);
            if(!IS_THIS_MODEL_A_HELI(model) && !IS_THIS_MODEL_A_BIKE){
                GET_CHAR_IN_CAR_PASSENGER_SEAT(tmp,1,&tmp_ped[0]);
                GET_DRIVER_OF_CAR(tmp,&tmp_ped[1]);
                if(tmp_ped[0] == pPlayer || tmp_ped[1] == pPlayer)
                    bone = BONE_LEFT_HAND;
            }
        }
        else bone = BONE_RIGHT_HAND;

        GET_PED_BONE_POSITION(pPlayer,bone,2.0,0.0,0.0,&play_tmp);
        GET_PED_BONE_POSITION(pPlayer,bone,100.0,0.0,0.0,&aim_tmp);

        if(IS_CHAR_SHOOTING(pPlayer)){
            GET_CURRENT_CHAR_WEAPON(pPlayer,&wWeapon);
            fire_projectile(wWeapon);
        }
        projectile_action();
    }

    if(superrun){
        if(!IS_CHAR_IN_ANY_CAR(pPlayer)){
            if(IS_BUTTON_PRESSED(0,BUTTON_LB) && IS_BUTTON_PRESSED(0,BUTTON_A)){
                APPLY_FORCE_TO_PED(pPlayer,true,0.0,100.0,0.0,0.0,0.0,0.0,true,true,true,true);
            }
        }
    }
    if(superjump){
        if(!IS_CHAR_IN_ANY_CAR(pPlayer)){
            if(IS_BUTTON_PRESSED(0,BUTTON_LB) && IS_BUTTON_PRESSED(0,BUTTON_X)){
                APPLY_FORCE_TO_PED(pPlayer,true,0.0,0.0,20.0,0.0,0.0,0.0,true,true,true,true);
            }
        }   
    }

    if(fastreload){
        SET_PLAYER_FAST_RELOAD(GetPlayerIndex(), true);
    }

    if(forcefield){
        float x,y,z;
        GET_CHAR_COORDINATES(pPlayer,&x,&y,&z);
        ADD_EXPLOSION(x,y,z,EXPLOSION_SHIP_DESTROY,10.0,false,true,0.0);
    }

    if(hydrolics){
        if(IS_BUTTON_PRESSED(0,BUTTON_X))
            {
                Vehicle PlayerVehicle;
                if (IS_CHAR_IN_ANY_CAR(GetPlayerPed()))
                    {
                        GET_CAR_CHAR_IS_USING(GetPlayerPed(), &PlayerVehicle);  
                        if((!IS_CHAR_IN_ANY_BOAT(GetPlayerPed())) && (!IS_CHAR_IN_ANY_HELI(GetPlayerPed())))
                            {
                                if (IS_VEHICLE_ON_ALL_WHEELS( PlayerVehicle ))
                                    {
                                        APPLY_FORCE_TO_CAR(PlayerVehicle, 0.0f, 0.0f, 0.0f, 60.0f , 0.0f,0.0f,-60.0f, 0, 1, 1, 1 );
                                        //APPLY_FORCE_TO_CAR(PlayerVehicle, 0, x,y, z, spinX,  spinY,  spinZ,  0, 1, 1, 1); 
                                    }

                            }
                    }
            }
    }

    if(invisible){
    SET_CHAR_VISIBLE(pPlayer, false);
    }
    else{
    SET_CHAR_VISIBLE(pPlayer, true);
    }

    if(chaos){
        float dX,dY,dZ;
        GET_CHAR_COORDINATES(GetPlayerPed(),&dX, &dY, &dZ);
        ClosestCar = GET_CLOSEST_CAR(dX,dY,dZ, 15, false, 70);

            if( DOES_VEHICLE_EXIST(ClosestCar))
            {
                APPLY_FORCE_TO_CAR(ClosestCar, 3, 30.0, -20.0, 0.0, 0.0, 0.0, 0.0, 0, 1, 1, 1);
                EXPLODE_CAR(ClosestCar, true, false);
            }
            GET_CHAR_COORDINATES(GetPlayerPed(),&dX, &dY, &dZ);
            GET_CLOSEST_CHAR(dX,dY,dZ, 30.0F, 1 ,1, &gameped);
            if(DOES_CHAR_EXIST(gameped))
            {
                if(IS_CHAR_IN_ANY_CAR(gameped))
                {
                    GET_CAR_CHAR_IS_USING(gameped, &PlayerVehicle); 
                    APPLY_FORCE_TO_CAR(ClosestCar, 3, 30.0, -20.0, 0.0, 0.0, 0.0, 0.0, 0, 1, 1, 1);
                    EXPLODE_CAR(ClosestCar, true, false);
                }
                else if(!IS_CHAR_IN_ANY_CAR(gameped))
                {
                    if(!IS_CHAR_ON_FIRE(gameped))
                    {
                        START_CHAR_FIRE(gameped);
                    }
                }
            }
    }

    if(ragdoll){
        if(IS_BUTTON_PRESSED(0,BUTTON_LB) && IS_BUTTON_JUST_PRESSED(0,BUTTON_B)){
            if(!IS_PED_RAGDOLL(pPlayer)){
                SWITCH_PED_TO_RAGDOLL(pPlayer,20000,30000,false,false,false,false);
                SWITCH_PED_TO_ANIMATED(pPlayer,true);
                GIVE_PLAYER_RAGDOLL_CONTROL(GET_PLAYER_ID(),true);
            }
            else{
                SWITCH_PED_TO_ANIMATED(pPlayer,false);
                GIVE_PLAYER_RAGDOLL_CONTROL(GET_PLAYER_ID(),false);
            }
        }
    }

    //vehicles
    Vehicle pveh;
    if(vhelper){
        if(IS_CHAR_IN_ANY_CAR(pPlayer)){
            GET_CAR_CHAR_IS_USING(pPlayer,&pveh);
            SET_CAR_CAN_BE_DAMAGED(pveh,false);
            SET_CAR_CAN_BE_VISIBLY_DAMAGED(pveh,false);
            SET_CAN_BURST_CAR_TYRES(pveh,false);
            SET_HELI_BLADES_FULL_SPEED(pveh);
        }
    }
    if(carsonground){
        if(IS_CHAR_IN_ANY_CAR(pPlayer)){
            GET_CAR_CHAR_IS_USING(pPlayer,&pveh);
            SET_CAR_ON_GROUND_PROPERLY(pveh);
        }
    }

    if(bikefly){
        if((IS_CHAR_ON_ANY_BIKE(pPlayer)) && IS_BUTTON_PRESSED(0,BUTTON_R)){
            float speed;
            GET_CAR_CHAR_IS_USING(pPlayer,&pveh);
            GET_CAR_SPEED(pveh,&speed);
            SET_CAR_FORWARD_SPEED(pveh,(speed * 1.05));
        }
    }

    if(nfs){
        if(IS_CHAR_IN_ANY_CAR(pPlayer) && IS_BUTTON_PRESSED(0,BUTTON_R)){
            float speed;
            GET_CAR_CHAR_IS_USING(pPlayer,&pveh);
            if((!IS_CHAR_IN_ANY_BOAT(pPlayer)) && (!IS_CHAR_IN_ANY_HELI(pPlayer))){
                SET_CAR_ON_GROUND_PROPERLY(pveh);
                GET_CAR_SPEED(pveh,&speed);
                SET_CAR_FORWARD_SPEED(pveh,(speed * 1.02));
            }
            else{
                GET_CAR_SPEED(pveh,&speed);
                SET_CAR_FORWARD_SPEED(pveh,(speed * 1.02));
                }
        }
    }

    //weapons
    if(ammo){
        if(IS_CHAR_SHOOTING(pPlayer)){
            uint weapon,ammo;
            GET_CURRENT_CHAR_WEAPON(pPlayer,&weapon);
            if(weapon != WEAPON_GRENADE && weapon != WEAPON_MOLOTOV){
                GET_MAX_AMMO_IN_CLIP(pPlayer,weapon,&ammo);
                SET_AMMO_IN_CLIP(pPlayer,weapon,ammo);
            }
        }
    }

    //misc
    if(chat_thingy){
        int i;
        float pos_y = 0.875;
        for(i = 16;i >= 0;i--){
            if(i < 0) continue;
            if(!IS_NETWORK_PLAYER_ACTIVE(i)) continue;
            if(!NETWORK_IS_PLAYER_TALKING(i)) continue;
            if(NETWORK_IS_PLAYER_MUTED_BY_ME(i)) continue;
            GET_PLAYER_RGB_COLOUR(i,&r,&g,&b);
            set_up_draw(3,0.3,0.3,r,g,b,255);
            draw_text("STRING",0.70,pos_y,GET_PLAYER_NAME(i));
            pos_y -= 0.03;          
        }
    }

    if(GET_NUMBER_OF_INSTANCES_OF_STREAMED_SCRIPT("player_menuiv") != 0 && show_menu)
        menu_shutdown();

    //garage
    if(in_paint && IS_CHAR_IN_ANY_CAR(pPlayer)){
        if(menu[item_select].value != menu[item_select].extra_val){
            uint color1,color2,spec1,spec2;
            GET_CAR_COLOURS(pveh,&color1,&color2);
            GET_EXTRA_CAR_COLOURS(pveh,&spec1,&spec2);
            if(item_select == 1)
                CHANGE_CAR_COLOUR(pveh,(menu[item_select].value - 1),color2);
            if(item_select == 2)
                CHANGE_CAR_COLOUR(pveh,color1,(menu[item_select].value - 1));
            if(item_select == 3)
                SET_EXTRA_CAR_COLOURS(pveh,(menu[item_select].value - 1),spec2);                
            if(item_select == 4)
                SET_EXTRA_CAR_COLOURS(pveh,spec1,(menu[item_select].value - 1));

            menu[item_select].extra_val = menu[item_select].value;
        }
    }
    return;
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T09:35:14+00:00Added an answer on June 14, 2026 at 9:35 am

    Your void looped_functions(void){ is inside some other function. You have likely a missing } somewhere in the function preceding looped_functions, e.g.

    void another_func(void) {
      if(something) {
        if(somethingelse) {
           doit();
         // < missing a } here, causing looped_function below to be defined within 
         //this function
      }
    }
    
    
    void looped_functions(void){
    
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to compile the next code, but I'm getting this error on the
I'm trying to compile some code, but I'm getting an error: Error invalid conversion
I'm trying to compile some code in MonoTouch but I'm getting an error: 'type
So I keep getting this error when trying to compile C++ code using CodeBlocks.
I'm trying to compile some code for the iphone simulator but am getting this
I'm trying to compile this code (the last one): http://www.aforgenet.com/framework/features/blobs_processing.html but it throws: Use
i am trying to compile this code, but if i do using: gcc prt.c
I am trying to compile the following code but I am getting linker errors.
Hi trying the compile Objective C++/Protocol code but the compilation fails with error Expected
I am trying to compile my code, but I am getting errors when using

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.