Results 1 to 4 of 4

Thread: [help]norecoil

  1. #1
    Junior Member
    Join Date
    May 2012
    Location
    UnitedKingdom
    Posts
    7

    Angry [help]norecoil

    hi people i have tried this script (not mine) and it brings up error please help

    script
    Code:
    #include <windows.h>
     
    struct matrix_t
    {
          float recoil[3]; 
    };
    
    matrix_t* matrix = ( matrix_t* )0xB35980;
    
    bool WINAPI ZeroRecoil( LPVOID lpParam )
    {
    
    while(true)
        {
    
    for(int i = 0; i < 3; i++)
                matrix->recoil[i] = 0.0f;
            Sleep(1);
        }
    
    return true;
    }
    
    bool APIENTRY DllMain( HMODULE hM, DWORD dwEvent, LPVOID pvReserved )
    {
    if( dwEvent == DLL_PROCESS_ATTACH )
            CreateThread( NULL, 0, ( LPTHREAD_START_ROUTINE )ZeroRecoil, NULL, 0, NULL );
    
    return true;
    }
    Error
    Code:
    1>------ Build started: Project: LeetBouncerz, Configuration: Debug Win32 ------
    1>  lbx.cpp
    1>c:\users\james\desktop\projects\leetbouncerz\leetbouncerz\lbx.cpp(27): error C2084: function 'BOOL DllMain(HMODULE,DWORD,LPVOID)' already has a body
    1>          c:\users\james\desktop\projects\leetbouncerz\leetbouncerz\lbx.cpp(9) : see previous definition of 'DllMain'
    1>c:\users\james\desktop\projects\leetbouncerz\leetbouncerz\lbx.cpp(58): error C2556: 'bool DllMain(HMODULE,DWORD,LPVOID)' : overloaded function differs only by return type from 'BOOL DllMain(HMODULE,DWORD,LPVOID)'
    1>          c:\users\james\desktop\projects\leetbouncerz\leetbouncerz\lbx.cpp(9) : see declaration of 'DllMain'
    1>  norecoil.cpp
    1>  Generating Code...
    ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

  2. #2

    Re: [help]norecoil

    this isn't a script and actually is it c++ code
    the error tells your what to do, you need to remove one dllmain, obviously a .dll wont be work with two dllmain's

  3. #3
    Junior Member
    Join Date
    May 2012
    Location
    UnitedKingdom
    Posts
    7

    Re: [help]norecoil

    ok i tried it and it dont work FML can anyone tell me why?
    thanks
    struct matrix_t
    {
    float recoil[3];
    };

    matrix_t* matrix = ( matrix_t* )0xB35980;

    bool WINAPI ZeroRecoil( LPVOID lpParam )
    {

    while(true)
    {

    for(int i = 0; i < 3; i++)
    matrix->recoil[i] = 0.0f;
    Sleep(1);
    }

    return true;
    }struct matrix_t
    {
    float recoil[3];
    };

    matrix_t* matrix = ( matrix_t* )0xB35980;

    bool WINAPI ZeroRecoil( LPVOID lpParam )
    {

    while(true)
    {

    for(int i = 0; i < 3; i++)
    matrix->recoil[i] = 0.0f;
    Sleep(1);
    }

    return true;
    }
    Last edited by james2233; July 16th, 2012 at 17:16.

  4. #4

    Re: [help]norecoil

    Let's have a short lesson in learning to read errors so that you can make c+p'd code work - though I hold a certainty that you will continue to run to forums in the future.

    The great thing about Visual Studio (which just from the error formatting I assume you're using) is how cleanly it spells out errors to those who read!

    Code:
    1>------ Build started: Project: LeetBouncerz, Configuration: Debug Win32 ------ 
    1>  lbx.cpp 
    1>c:\users\james\desktop\projects\leetbouncerz\leetbouncerz\lbx.cpp(27): error C2084: function 'BOOL DllMain(HMODULE,DWORD,LPVOID)' already has a body 
    1>          c:\users\james\desktop\projects\leetbouncerz\leetbouncerz\lbx.cpp(9) : see previous definition of 'DllMain' 
    1>c:\users\james\desktop\projects\leetbouncerz\leetbouncerz\lbx.cpp(58): error C2556: 'bool DllMain(HMODULE,DWORD,LPVOID)' : overloaded function differs only by return type from 'BOOL DllMain(HMODULE,DWORD,LPVOID)' 
    1>          c:\users\james\desktop\projects\leetbouncerz\leetbouncerz\lbx.cpp(9) : see declaration of 'DllMain' 
    1>  norecoil.cpp 
    1>  Generating Code... ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
    Now if you look at the errors, you will see a number in parenthesis right after the .cpp - this is the line the error occurs on! Now, putting on our serious thinking face, we see that the two errors are, in fact, on different lines. If we then bust out our English skillz, we then see that the error is saying you have two functions of the same name, which leads me to believe you opened up a project, choose a Dll type from the wizard, and then proceeded to paste this code on top of your original template.

    But let's give you the benefit of the doubt - maybe you did remove the original DllMain, and this code should compile. Sometimes VS gets screwed up, so go to "Build"->"Clean" and then rebuild your code. If that doesn't work, create a new Dll project, choose a blank project, and then create a .cpp file and drop it in.

Similar Threads

  1. Simple NoRecoil for MAC
    By iispankj00 in forum Enemy Territory Cheats (Linux)
    Replies: 0
    Last Post: January 13th, 2013, 17:20
  2. NEED NORecoiL 1.3V COD
    By igesee in forum Call of Duty 2 Cheats
    Replies: 7
    Last Post: May 22nd, 2010, 01:03
  3. norecoil
    By onix1 in forum Call of Duty 2 Cheats
    Replies: 3
    Last Post: September 1st, 2009, 15:37
  4. Norecoil
    By convencido in forum Call of Duty 2 Cheats
    Replies: 3
    Last Post: June 17th, 2009, 17:14
  5. Norecoil
    By alien223 in forum Call of Duty 2 Cheats
    Replies: 1
    Last Post: December 1st, 2007, 21:38

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •