Page 1 of 2 12 LastLast
Results 1 to 10 of 14

Thread: Can't find the mistake...

  1. #1
    Private
    Join Date
    Oct 2014
    Posts
    32
    Thanks
    0
    Thanked 5 Times in 4 Posts

    Can't find the mistake...

    Hey I got some problem with my scripts..
    For example this code line worked few months ago and now it doesn't.

    PHP Code:
    template <typename ... Tsvoid Com_Printf(const charfmtTs ... ts); 
    Give me this error:

    PHP Code:
    Ferror C2061SyntaxfehlerBezeichner 'Ts' 
    I'm using Visual Studio 2012 for Windows Desktop. And I get more errors that never happened before. Example:

    PHP Code:
    error C2143SyntaxfehlerEs fehlt ',' vor '...' 
    Same Line

    Anyone knows the reason?

    Thanks in advance

  2. #2
    Private First Class php's Avatar
    Join Date
    Nov 2012
    Posts
    142
    Thanks
    28
    Thanked 116 Times in 59 Posts
    Yeah

    a) try reading upon the code that you copy from other sources (https://github.com/riicchhaarrd/CoDE...ws/include.hpp) e.g google templates?
    b) does your current compiler support those templates? c++11/14
    Last edited by php; 14th October 2015 at 21:29.

  3. #3
    Private
    Join Date
    Oct 2014
    Posts
    32
    Thanks
    0
    Thanked 5 Times in 4 Posts
    a) I do, at least I tried to. And it worked some time ago, now it doesn't.. For those who doesn't know, I got the source from PHP's Github. Credits given to him
    b) Yes the compiler supported them before too..

  4. #4
    Assadministrator IzNoGoD's Avatar
    Join Date
    Aug 2012
    Posts
    1,718
    Thanks
    17
    Thanked 1,068 Times in 674 Posts
    Did you set your compiler to c++11/14 mode?
    "Does not work" is an error report for a bug between keyboard and chair.

    All hail Artie Effem

  5. #5
    Assadministrator kung foo man's Avatar
    Join Date
    Jun 2012
    Location
    trailerpark
    Posts
    2,010
    Thanks
    2,102
    Thanked 1,084 Times in 753 Posts
    Just post the whole file, it could be some missing { or ; or whatever some lines above it
    timescale 0.01

  6. #6
    Private
    Join Date
    Oct 2014
    Posts
    32
    Thanks
    0
    Thanked 5 Times in 4 Posts
    It's working now with Visual Basic 2015.. Thanks anyway!
    Now I can't inject the file anymore.. Everything was working before and now it doesn't. Any Idea?

    PHP Code:
    #include "include.h"


    mySQL mySqlCon("127.0.0.1""""""db"3306);

    int closer()
    {

        
    int a Scr_GetInt(0);
        
    int b Scr_GetInt(1);
        
    charScr_GetString(2);

        switch (
    a)
        {
        case 
    1//getGuidNew
            
    Scr_AddInt(1);
            break;

        case 
    2//login User
            
    Scr_AddInt(6666);
            break;

        case 
    3//MySQL Query SELECT
        
    {
            
    MYSQL_RES *res mySqlCon.gsc_mysql_query(c);
            
    MYSQL_ROW row mySqlCon.gsc_mysql_fetch_row(res);
            
    Scr_AddString(row[0]);
            break;
        }
        case 
    4//MySQL Query
        
    {
            if (!
    mySqlCon.gsc_mysql_query(c))
                
    Scr_AddInt(1);
            else
                
    Scr_AddInt(0);
            break;
        }

        default:
            
    Com_Printf("Unkown closer() command: %d\n"a);
        }

        return 
    1;
    }
    void mainMethod()
    {
        
    Cmd_AddCommand("help"version);
        
    cracking_hook_call(0x4686FA, (int)Sys_LoadDll);
        if (
    GetModuleHandle("uo_game_mp_x86.dll") != NULL) {
            
    ScriptInitiating();
        }
        
    cracking_hook_function(0x2003AA50, (int)closer);
    }

    DWORD g_threadID;
    HMODULE g_hModule;
    extern "C"  BOOL APIENTRY DllMain(HINSTANCE hinstDLLDWORD fdwReasonLPVOID lpvReserved) {
        switch (
    fdwReason)
        {
        case 
    DLL_PROCESS_ATTACH:
            
    g_hModule hinstDLL;
            
    DisableThreadLibraryCalls(hinstDLL);
            
    Com_Printf("\n[CoD Xtreme] Injected successfully. Visit www.modszombies.com\n");
            
    mainMethod();
            break;

        case 
    DLL_PROCESS_DETACH:
        case 
    DLL_THREAD_DETACH:
            
    FreeLibraryAndExitThread(g_hModule0);
            break;
        }
        return 
    TRUE;

    DllMain isn't called. I also added MessageBoxes etc.. Doesn't work. Tried to inject with my own injector which worked before and with cheatengine.

    You can view the whole source here: https://github.com/modsfabio/codextreme_v1
    Last edited by fabio; 15th October 2015 at 08:32.

  7. #7
    Sergeant serthy's Avatar
    Join Date
    Nov 2012
    Posts
    450
    Thanks
    96
    Thanked 296 Times in 188 Posts
    Maybe post your whole project?

  8. #8
    Private
    Join Date
    Oct 2014
    Posts
    32
    Thanks
    0
    Thanked 5 Times in 4 Posts

  9. #9
    Sergeant serthy's Avatar
    Join Date
    Nov 2012
    Posts
    450
    Thanks
    96
    Thanked 296 Times in 188 Posts
    Quote Originally Posted by fabio View Post
    No, I meant your complete visual studio project (solution, external libs etc).

    Your repo does not build on its own..

  10. #10
    Private
    Join Date
    Oct 2014
    Posts
    32
    Thanks
    0
    Thanked 5 Times in 4 Posts

Posting Permissions

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