google-site-verification: googlebaca44933768a824.html Error - Old Royal Hack Forum

Announcement

Collapse
No announcement yet.

Error

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Error

    Hey I have a small question. Just for test purposes I just took Distance Esp and slapped into a hook source and tried compiling (Using VS 2k3) and I get this error.

    Here is how I call the distant calc.

    Code:
    HalFLife2.m_pNeeded->DrawString( vScreen.x, vScreen.y + 39, dwGetTeamColor, "D : %.0f", GetDistance( pLocalBaseEnt->GetAbsOrigin(), pBaseEntity->GetAbsOrigin() ) );
    This is the actual function.

    Code:
    float GetDistance( Vector vecOriginx,Vector vecOriginy )
    {
    	Vector vecDistance = vecOriginx - vecOriginy;
    	return sqrtf( vecDistance.Length() );
    }
    Here is the error :
    c:\Documents and Settings\Home\Desktop\Rh\Hl2\esp.cpp(93): error C2065: 'pLocalBaseEnt' : undeclared identifier

    c:\Documents and Settings\Home\Desktop\Rh\Hl2\esp.cpp(93): error C2227: left of '->GetAbsOrigin' must point to class/struct/union
    type is ''unknown-type''

    #2
    Originally posted by selig
    Code:
    HalFLife2.m_pNeeded->DrawString( vScreen.x, vScreen.y + 39, dwGetTeamColor, "D : %.0f", GetDistance( pLocalBaseEnt->GetAbsOrigin(), pBaseEntity->GetAbsOrigin() ) );
    Here is the error :
    c:Documents and SettingsHomeDesktopRhHl2esp.cpp(93): error C2065: 'pLocalBaseEnt' : undeclared identifier

    c:Documents and SettingsHomeDesktopRhHl2esp.cpp(93): error C2227: left of '->GetAbsOrigin' must point to class/struct/union
    type is ''unknown-type''
    Where to begin..

    Code:
     pBaseEntity->GetAbsOrigin()
    your probobly too dumb to find GetAbsOrigin in your Leet C++ source. Sorry to be rude btw, just replace what I posted above with what your using now for getorigin and you should be fine.

    Comment


      #3
      Thanks. So if I divide like "/ 48" it set the unit of measure?

      Comment


        #4
        '/22' is a reasonable amount. thats what i use for my calcs

        sigpic

        -=[ http://kaos.99k.org ]=-

        czkb: yay but for now i still understand half of the half of the quarter of the half of what i must know.
        [email protected] (E-mail Address Not Verified) says:
        http://www.youtube.com/user/ka0s99k#p/f/70/iK9bhyl6B_E
        J says:
        can we please accomplish something

        Comment


          #5
          k

          Well I need to square it because my calc is / 48 (Meters) and the dist esp number is 402323232. So I need to square it some how right?

          Comment

          Working...
          X