Insurgency ESP problems (SOURCE)

Posts 1–8 of 8 · Page 1 of 1
Insurgency ESP problems (SOURCE)
Ok i have some source code im trying to compile for Insurgency but I am getting several error and i cannot figure out what I am doing wrong. Can anyone help me out?

Code:
void CESP::DrawPlayerBones(Renderer* pPen, CPlayer* pPlayer, D3DCOLOR colorEntity)
{
    static const std::vector<std::vector<int>> vBones =
    {
        { 55, 54, 53, 52, 56, 57, 58, 59 ), //legs
        { 11, 28, 27, 26, 8, 7, 6, 30, 48, 49, 50 ), //arms
        { 1, 2, 3, 4, 51 } //body
    };

    v3 vScreenLastBone = { 0 };
    v3 vScreenPosBone1 = { 0 };
    v3 vScreenPosBone2 = { 0 };

    for (auto& dim : vBones)
    {
        for (auto it = dim.begin(); it != dim.end() - 1; it++)
        {
            v3 vBonePos1 = pPlayer->GetBonePosition(*(it+0));
            v3 vBonePos2 = pPlayer->GetBonePosition(*(it+1));

            if (it == dim.begin())
                vScreenPosBone1 = WorldToScreen(vBonePos1);
            else
                vScreenPosBone1 = vScreenLastBone;

            vScreenPosBone2 = WorldToScreen(vBonePos2);

            if (vScreenPosBone1.z > 0.001f && vScreenPosBone2.z > 0.001f)
                pPen->DrawLine(vScreenPosBone1.x, vScreenPosBone1.y, vScreenPosBone2.x, vScreenPosBone2.y, colorEntity, 1.f);

            vScreenLastBone = vScreenPosBone2;
        }
    }
}
Code:
for (auto& dim : vBones)
lol you really?
IIRC this is the loop for Java.
having same issues ;_; *bump*
It might help to actually tell people what your issue is.
Like it or not, this isn't a psychic community.
Error i get:
1>c:\documents\visual studio 2010\projects\insurgency testo\insurgency testo\main.cpp(1): error C2653: 'CESP' : is not a class or namespace name
1>c:\documents\visual studio 2010\projects\insurgency testo\insurgency testo\main.cpp(1): error C2065: 'Renderer' : undeclared identifier
1>c:\documents\visual studio 2010\projects\insurgency testo\insurgency testo\main.cpp(1): error C2065: 'pPen' : undeclared identifier
1>c:\documents\visual studio 2010\projects\insurgency testo\insurgency testo\main.cpp(1): error C2065: 'CPlayer' : undeclared identifier
1>c:\documents\visual studio 2010\projects\insurgency testo\insurgency testo\main.cpp(1): error C2065: 'pPlayer' : undeclared identifier
1>c:\documents\visual studio 2010\projects\insurgency testo\insurgency testo\main.cpp(1): error C2065: 'D3DCOLOR' : undeclared identifier
1>c:\documents\visual studio 2010\projects\insurgency testo\insurgency testo\main.cpp(1): error C2146: syntax error : missing ')' before identifier 'colorEntity'
1>c:\documents\visual studio 2010\projects\insurgency testo\insurgency testo\main.cpp(1): error C2182: 'DrawPlayerBones' : illegal use of type 'void'
1>c:\documents\visual studio 2010\projects\insurgency testo\insurgency testo\main.cpp(1): error C2078: too many initializers
1>c:\documents\visual studio 2010\projects\insurgency testo\insurgency testo\main.cpp(1): error C2059: syntax error : ')'
1>c:\documents\visual studio 2010\projects\insurgency testo\insurgency testo\main.cpp(2): error C2143: syntax error : missing ';' before '{'
1>c:\documents\visual studio 2010\projects\insurgency testo\insurgency testo\main.cpp(2): error C2447: '{' : missing function header (old-style formal list?)
1>\documents\visual studio 2010\projects\insurgency testo\insurgency testo\main.cpp(35): fatal error C1004: unexpected end-of-file found



And no, i'm not a c++ magician, so i've been fucked clueless ^^
Quote Originally Posted by MrTittles View Post
Error i get:
is not a class or namespace name
undeclared identifier
before identifier 'colorEntity'
illegal use of type 'void'
too many initializers
syntax error : ')'
missing ';' before '{'
'{' : missing function header (old-style formal list?)
fatal error C1004: unexpected end-of-file found

And no, i'm not a c++ magician, so i've been fucked clueless ^^
.................................................. ........................^^^^^
is not a class or namespace name
(you used two different names for your main file or targeted a file that does not exist or misspelled the main file/class name)

undeclared identifier
(You didn't declare it needs to be a string, int, var ect.)

before identifier 'colorEntity'
(Requires you to pick a declared color or put an if statement leading to a new line of code if color isn't declared.)

illegal use of type 'void'
(You cant use void here)

too many initializers
(really???)

syntax error : ')'
missing ';' before '{'
'{' : missing function header (old-style formal list?)
(These are common sense)

fatal error C1004: unexpected end-of-file found
(Code/script was left open need to close perhaps)

Welcome to programming I have only had a few simple classes start the hard stuff next year, finishing my graphics design degree first :P
Quote Originally Posted by MrTittles View Post
Error i get:
1>c:\documents\visual studio 2010\projects\insurgency testo\insurgency testo\main.cpp(1): error C2653: 'CESP' : is not a class or namespace name
1>c:\documents\visual studio 2010\projects\insurgency testo\insurgency testo\main.cpp(1): error C2065: 'Renderer' : undeclared identifier
1>c:\documents\visual studio 2010\projects\insurgency testo\insurgency testo\main.cpp(1): error C2065: 'pPen' : undeclared identifier
1>c:\documents\visual studio 2010\projects\insurgency testo\insurgency testo\main.cpp(1): error C2065: 'CPlayer' : undeclared identifier
1>c:\documents\visual studio 2010\projects\insurgency testo\insurgency testo\main.cpp(1): error C2065: 'pPlayer' : undeclared identifier
1>c:\documents\visual studio 2010\projects\insurgency testo\insurgency testo\main.cpp(1): error C2065: 'D3DCOLOR' : undeclared identifier
1>c:\documents\visual studio 2010\projects\insurgency testo\insurgency testo\main.cpp(1): error C2146: syntax error : missing ')' before identifier 'colorEntity'
1>c:\documents\visual studio 2010\projects\insurgency testo\insurgency testo\main.cpp(1): error C2182: 'DrawPlayerBones' : illegal use of type 'void'
1>c:\documents\visual studio 2010\projects\insurgency testo\insurgency testo\main.cpp(1): error C2078: too many initializers
1>c:\documents\visual studio 2010\projects\insurgency testo\insurgency testo\main.cpp(1): error C2059: syntax error : ')'
1>c:\documents\visual studio 2010\projects\insurgency testo\insurgency testo\main.cpp(2): error C2143: syntax error : missing ';' before '{'
1>c:\documents\visual studio 2010\projects\insurgency testo\insurgency testo\main.cpp(2): error C2447: '{' : missing function header (old-style formal list?)
1>\documents\visual studio 2010\projects\insurgency testo\insurgency testo\main.cpp(35): fatal error C1004: unexpected end-of-file found



And no, i'm not a c++ magician, so i've been fucked clueless ^^
Do not just C&P a simple code man else you'll almost never be able to solve that kinda easy problems, you might learn programming
Quote Originally Posted by n4n033 View Post
Do not just C&P a simple code man else you'll almost never be able to solve that kinda easy problems, you might learn programming
Lol, yeah. I'm a beginner coder and even I can tell this is C+Ped. And for the thread creator, this is the only help I am going to give. #include <iostream>
Posts 1–8 of 8 · Page 1 of 1
This thread is closed for replies.

Similar Threads

Tags for this Thread

None

Need help?