Welcome to the RaGEZONE - MMORPG development forums.

C++

This is a discussion on C++ within the Gunz Online forums, part of the MMO and MMORPG Developments category; Well, I downloaded and installed VS.2010 of C++. I found this thread; http://forum.ragezone.com/f311/0-000...0000-a-816399/ I don't know why I'm getting this; ...

Results 1 to 8 of 8
  1. #1
    I keep what I steal ;]
    Rank
    Subscriber
    Join Date
    Oct 2010
    Location
    Valhalla
    Posts
    1,478
    Liked
    380
    Gamertag: Awakening Light PSN ID: AwakeningLight Steam ID: Makakiyo

    C++

    Well, I downloaded and installed VS.2010 of C++.

    I found this thread; http://forum.ragezone.com/f311/0-000...0000-a-816399/

    I don't know why I'm getting this;

    Code:
    ------ Build started: Project: dmod, Configuration: Debug Win32 ------
      dmod.cpp
    c:\users\farron\documents\visual studio 2010\projects\dmod\dmod\dmod.cpp(11): error C2059: syntax error : 'constant'
    c:\users\farron\documents\visual studio 2010\projects\dmod\dmod\dmod.cpp(12): error C2059: syntax error : 'if'
    c:\users\farron\documents\visual studio 2010\projects\dmod\dmod\dmod.cpp(13): error C2143: syntax error : missing ';' before '{'
    c:\users\farron\documents\visual studio 2010\projects\dmod\dmod\dmod.cpp(13): error C2447: '{' : missing function header (old-style formal list?)
    ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
    --------------------------------------------------------------------------------------------

    I edit some of the coding.

    Code:
    #include "StdAfx.h"
    #include "targetver.h"
    #define ZCHARACTER_GETAP 0x00473740
    #define ZCHARACTER_GETHP 0x00473730
    #define ZCHARACTER 0x00402BA0
    #define ZGETGAMECLIENT 0x004ABCC0
    #define ZGETGAME 0x004ABDD0
    #define ZGAME 0x00672F68
    #define GetTargetCharacter 0x00402A30
    
    			ZCHARACTER * pCharacter = GetTargetCharacter();
    			if( pCharacter != NULL ) 
    			{
    				int nX = 100;
    				int nY = 50;
    				char szMsg[128] = { 0, };
    
    				sprintf(szMsg, "HP : %d / %d", pCharacter->GetHP(), pCharacter->GetMaxHP());
    				pDC->Text(nX, nY, szMsg);
    
    				sprintf(szMsg, "AP : %d / %d", pCharacter->GetAP(), pCharacter->GetMaxAP());
    				pDC->Text(nX, nY + 50, szMsg);
    			}
    I pretty much don't know what I'm doing here. I am still learning about to do these C++ language.

  2. #2
    Member
    Rank
    Member
    Join Date
    Feb 2012
    Posts
    29
    Liked
    1

    Re: C++

    u need to use visual studio 2003

  3. #3
    Die()
    Rank
    Subscriber
    Join Date
    Sep 2011
    Location
    /home/SDev/
    Posts
    621
    Liked
    213

    Re: C++

    Quote Originally Posted by Alfrdajpm View Post
    u need to use visual studio 2003
    This or port it too 2010 ect.
    And wtf r u using addresses for if your using the gunz src...

    +Rep & +Like if You found my Post Useful.


  4. #4
    I keep what I steal ;]
    Rank
    Subscriber
    Join Date
    Oct 2010
    Location
    Valhalla
    Posts
    1,478
    Liked
    380
    Gamertag: Awakening Light PSN ID: AwakeningLight Steam ID: Makakiyo

    Re: C++

    I'm trying to make a .dll file.

  5. #5
    Aristrum :D
    Rank
    Subscriber
    Join Date
    Aug 2007
    Location
    United Kingdom
    Posts
    531
    Liked
    153

    Re: C++

    Post the full source of "c:\users\farron\documents\visual studio 2010\projects\dmod\dmod\dmod.cpp", then we can help.

  6. #6
    Die()
    Rank
    Subscriber
    Join Date
    Sep 2011
    Location
    /home/SDev/
    Posts
    621
    Liked
    213

    Re: C++

    Quote Originally Posted by Jirachi View Post
    I'm trying to make a .dll file.
    oh sry above post confused me.

    +Rep & +Like if You found my Post Useful.


  7. #7
    I keep what I steal ;]
    Rank
    Subscriber
    Join Date
    Oct 2010
    Location
    Valhalla
    Posts
    1,478
    Liked
    380
    Gamertag: Awakening Light PSN ID: AwakeningLight Steam ID: Makakiyo

    Re: C++

    It's in the first post, Mark. Forgot to say that's the dmod.cpp.

  8. #8
    Aristrum :D
    Rank
    Subscriber
    Join Date
    Aug 2007
    Location
    United Kingdom
    Posts
    531
    Liked
    153

    Re: C++

    Quote Originally Posted by Jirachi View Post
    It's in the first post, Mark. Forgot to say that's the dmod.cpp.
    Ok, in that case I suggest you look up some basic C++ tutorials so that you're familiar with the language. There doesn't seem to be a main function of any kind and the addresses you've defined won't do you any good without accompanying class definitions (which you will have to reverse or find yourself).

    The specific errors you're getting are because the compiler doesn't expect to just suddenly encounter code. It's got to be in some kind of function first.

    Like I said, you should read into some basic tutorials and then try to make a basic DLL of your own, perhaps by following a guide (I think PenguinGuy had a decent one on here that will require basic C++ knowledge).

    The better route would be to learn basic C++ and then compile the source as it will be much easier to modify things like this. If you're still attached to 2007 GunZ, there is a version for that floating around.

 

 

Posting Permissions

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