• Unfortunately, we have experienced significant hard drive damage that requires urgent maintenance and rebuilding. The forum will be a state of read only until we install our new drives and rebuild all the configurations needed. Please follow our Facebook page for updates, we will be back up shortly! (The forum could go offline at any given time due to the nature of the failed drives whilst awaiting the upgrades.) When you see an Incapsula error, you know we are in the process of migration.

Dash colors from options menu

Joined
Jan 9, 2009
Messages
614
Reaction score
152
ZEffectManager.h:

find this:
void AddDashEffect(rvector& Target,rvector& TargetNormal,ZObject* pObj);
replace with this:
void AddDashEffect(rvector& Target,rvector& TargetNormal,ZObject* pObj,int nDashColor);

ZEffectManager.cpp:

find void ZEffectManager::AddDashEffect function and replace the function with this:
void ZEffectManager::AddDashEffect(rvector& Target,rvector& TargetNormal,ZObject* pObj,int nDashColor)
{
if (!pObj->IsVisible()) return;
char szDash[255];
if (nDashColor == 0 || nDashColor < 1 || nDashColor > 7) // 7 b/c roygbiv
{
sprintf(szDash, "dash_effect");
}
else
{
sprintf(szDash, "dash_effect%d", nDashColor);
}


ZEffect* pNew = NULL;
pNew = new ZEffectDash(m_pEffectMeshMgr->Get(szDash), Target, TargetNormal, pObj->GetUID());
((ZEffectSlash*)pNew)->SetAlignType(1);
Add(pNew);
}

ZGame.cpp:

find this:
pEM->AddDashEffect(vPos, vTarNormal, pCharacter);
replace with this:
pEM->AddDashEffect(vPos, vTarNormal, pCharacter,0);

find this:
ZGetEffectManager()->AddDashEffect(pos,dir,pCharacter);
replace with this:
ZGetEffectManager()->AddDashEffect(pos,dir,pCharacter,ppdi->nDashColor);

ZPost.h:

find this:
#define ZPostDash(/*rvector&*/ vPos, /*rvector&*/ vDir, /*unsigned char*/ sel_type) { \
ZPACKEDDASHINFO pdi; \
pdi.posx = Roundf(vPos.x); \
pdi.posy = Roundf(vPos.y); \
pdi.posz = Roundf(vPos.z); \
\
pdi.dirx = vDir.x*32000; \
pdi.diry = vDir.y*32000; \
pdi.dirz = vDir.z*32000; \
\
pdi.seltype = sel_type; \
ZPOSTCMD1(CLOAK_CMD_ID(MC_PEER_DASH, 9964),MCommandParameterBlob(&pdi,sizeof(ZPACKEDDASHINFO))); \
}

replace with this:
#define ZPostDash(/*rvector&*/ vPos, /*rvector&*/ vDir, /*unsigned char*/ sel_type, /*int*/ nDashColor) { \
ZPACKEDDASHINFO pdi; \
pdi.posx = Roundf(vPos.x); \
pdi.posy = Roundf(vPos.y); \
pdi.posz = Roundf(vPos.z); \
\
pdi.dirx = vDir.x*32000; \
pdi.diry = vDir.y*32000; \
pdi.dirz = vDir.z*32000; \
\
pdi.seltype = sel_type; \
pdi.nDashColor = nDashColor; \
ZPOSTCMD1(CLOAK_CMD_ID(MC_PEER_DASH, 9964),MCommandParameterBlob(&pdi,sizeof(ZPACKEDDASHINFO))); \
}
find this:
struct ZPACKEDDASHINFO {
short posx, posy, posz;
short dirx, diry, dirz;
BYTE seltype;
};
replace with this:
struct ZPACKEDDASHINFO {
short posx, posy, posz;
short dirx, diry, dirz;
BYTE seltype,nDashColor;
};

zreplay.cpp:

find case mc_peer_dash, replace it with this:
case MC_PEER_DASH:
{
rvector pos, dir;
int nSelType,nDashColor;

TempParams[0]->GetValue(&pos);
TempParams[1]->GetValue(&dir);
TempParams[2]->GetValue(&nSelType);
TempParams[3]->GetValue(&nDashColor);

ZPACKEDDASHINFO pdi;
pdi.posx = Roundf(pos.x);
pdi.posy = Roundf(pos.y);
pdi.posz = Roundf(pos.z);

pdi.dirx = DirElementToShort(dir.x);
pdi.diry = DirElementToShort(dir.y);
pdi.dirz = DirElementToShort(dir.z);

pdi.seltype = (BYTE)nSelType;
pdi.nDashColor = (BYTE)nDashColor;
pCmd->AddParameter(new MCommandParameterBlob(&pdi,sizeof(ZPACKEDDASHINFO)));
}
break;
ZConfiguration.h:

add this to ZCONFIG_VIDEO:
int nDashColor;

add these 2 thigns at th ebottom of the file:
#define Z_VIDEO_DASH (ZGetConfiguration()->GetVideo()->nDashColor)
#define ZTOK_VIDEO_DASH "DASHCOLOR"

ZConfiguration.cpp:

add this in loadconfig with the other ztok_video stuff:
childElement.GetChildContents(&m_Video.nDashColor, ZTOK_VIDEO_DASH);

add this in savetofile:
// Dash Color
parentElement.AppendText("\n\t\t");
aElement = parentElement.CreateChildElement(ZTOK_VIDEO_DASH);
sprintf(temp, "%d", m_Video.nDashColor);
aElement.SetContents(temp);

ZOptionInterface.cpp:
add this to initinterfaceoption:
pComboBox = (MComboBox*)pResource->FindWidget("DashColor")
if(pComboBox)
{
pComboBox->SetSelIndex(Z_VIDEO_DASH);
}

add this to saveinterfaceoption:
int nDashColor = 0;
pComboBox = (MComboBox*)pResource->FindWidget("DashColor")
if(pComboBox)
{
nDashColor = pComboBox->GetSelIndex();
if(Z_VIDEO_DASH != nDashColor)
{
Z_VIDEO_DASH = nDashColor;
}
}


ZMyCharacter.cpp:
find both instances of zpostdash in this file, and replace it with this:
ZPostDash( vPos, vDir, sel_type, Z_VIDEO_DASH );

decompile sfx.mrs, and add 7 folders. (names 1-7). Now, add the ef_dash.elu.ani, ef.dash.elu, both gz_ef dashes, and then open effect_list.xml.

effectlist.xml:
Find this:
<AddEffectElu name="dash_effect">
<AddBaseModel name="dash_effect" filename="ef_dash.elu" />
<AddAnimation name="play" filename="ef_dash.elu.ani" motion_type="0" motion_loop_type="lastframe" />
</AddEffectElu>
add this under it:
<AddEffectElu name="dash_effect1">
<AddBaseModel name="dash_effect1" filename="1/ef_dash.elu" />
<AddAnimation name="play" filename="ef_dash.elu.ani" motion_type="0" motion_loop_type="lastframe" />
</AddEffectElu>
I'll leave the option xml side of things for you guys to do, just copy an xml that's a combobox, and rename the widget to DashColor, then add the amount of listitem's based on colors. If there's any bugs with it let me know, i rushed this in like 5 minutes.
 
Last edited:
Newbie Spellweaver
Joined
Jun 10, 2009
Messages
86
Reaction score
1
childElement.GetChildContents(&m_Video.nMultiSampling, ZTOK_VIDEO_DASH);
Change "nMultiSampling" to "nDashColor"
I got an error "e:\Stable\Gunz\ZMyCharacter.cpp(2917): error C2039: 'ndashColor' : is not a member of 'ZPACKEDDASHINFO'
"ZPostDash( vPos, vDir, sel_type, Z_VIDEO_DASH );" <= This is the only one,there is no another ZPostDash in ZMyCharater
 
Last edited:
Joined
Jan 9, 2009
Messages
614
Reaction score
152
if there's only one then only replace the one, nmultisampling error is b/c i just sloppily pasted this into ragezone without really checking it, fixed ty for noticing. Your error is because I did a typo when typing in ragezone, it's nDashColor of course not ndashColor.
 
Good Guy George
Loyal Member
Joined
Apr 12, 2009
Messages
1,260
Reaction score
239
You can add option based on HEX Color, that would be more pro and thanks!
 
Newbie Spellweaver
Joined
Apr 29, 2015
Messages
75
Reaction score
6
ZMyCharacter.cpp(2968): error C2017: illegal escape sequence
ZMyCharacter.cpp(2968): error C2017: illegal escape sequence
ZMyCharacter.cpp(2968): error C2059: syntax error : '('
ZMyCharacter.cpp(2968): error C2039: 'MCommand' : is not a member of 'ZPACKEDDASHINFO'
ZPost.h(35) : see declaration of 'ZPACKEDDASHINFO'
ZMyCharacter.cpp(2968): error C2039: 'pC' : is not a member of 'ZPACKEDDASHINFO'
ZPost.h(35) : see declaration of 'ZPACKEDDASHINFO'
ZMyCharacter.cpp(2968): error C2039: 'ZNewCmd' : is not a member of 'ZPACKEDDASHINFO'
ZPost.h(35) : see declaration of 'ZPACKEDDASHINFO'
ZMyCharacter.cpp(2968): error C2039: 'UncloakCmdId' : is not a member of 'ZPACKEDDASHINFO'
ZPost.h(35) : see declaration of 'ZPACKEDDASHINFO'
ZMyCharacter.cpp(2968): error C2039: 'pC' : is not a member of 'ZPACKEDDASHINFO'
ZPost.h(35) : see declaration of 'ZPACKEDDASHINFO'
ZMyCharacter.cpp(2968): error C2039: 'AddParameter' : is not a member of 'ZPACKEDDASHINFO'
ZPost.h(35) : see declaration of 'ZPACKEDDASHINFO'
ZMyCharacter.cpp(2968): error C3861: 'pC': identifier not found, even with argument-dependent lookup
ZMyCharacter.cpp(3431): error C3861: 'MCommand': identifier not found, even with argument-dependent lookup
ZMyCharacter.cpp(3431): error C3861: 'pC': identifier not found, even with argument-dependent lookup
ZMyCharacter.cpp(3431): error C2227: left of '->AddParameter' must point to class/struct/union
type is ''unknown-type''
ZMyCharacter.cpp(3431): error C3861: 'pC': identifier not found, even with argument-dependent lookup
ZMyCharacter.cpp(3431): error C2227: left of '->AddParameter' must point to class/struct/union
type is ''unknown-type''
ZMyCharacter.cpp(3431): error C3861: 'pC': identifier not found, even with argument-dependent lookup
ZMyCharacter.cpp(3431): error C2227: left of '->AddParameter' must point to class/struct/union
type is ''unknown-type''
ZMyCharacter.cpp(3431): error C3861: 'pC': identifier not found, even with argument-dependent lookup
ZMyCharacter.cpp(3431): error C3861: 'pC': identifier not found, even with argument-dependent lookup
ZMyCharacter.cpp(3447): error C3861: 'MCommand': identifier not found, even with argument-dependent lookup
ZMyCharacter.cpp(3447): error C3861: 'pC': identifier not found, even with argument-dependent lookup
ZMyCharacter.cpp(3447): error C2227: left of '->AddParameter' must point to class/struct/union
type is ''unknown-type''
ZMyCharacter.cpp(3447): error C3861: 'pC': identifier not found, even with argument-dependent lookup
ZMyCharacter.cpp(3447): error C2227: left of '->AddParameter' must point to class/struct/union
type is ''unknown-type''
ZMyCharacter.cpp(3447): error C3861: 'pC': identifier not found, even with argument-dependent lookup
ZMyCharacter.cpp(3447): error C2227: left of '->AddParameter' must point to class/struct/union
type is ''unknown-type''
c:\Users\Sahar\Desktop\Source\Source\Source_Code\Stable\Gunz\ZMyCharacter.cpp(3447): error C3861: 'pC': identifier not found, even with argument-dependent lookup
ZMyCharacter.cpp(3447): error C3861: 'pC': identifier not found, even with argument-dependent lookup
ZMyCharacter.cpp(3450): error C3861: 'MCommand': identifier not found, even with argument-dependent lookup
ZMyCharacter.cpp(3450): error C3861: 'pC': identifier not found, even with argument-dependent lookup
ZMyCharacter.cpp(3450): error C2227: left of '->AddParameter' must point to class/struct/union
type is ''unknown-type''
ZMyCharacter.cpp(3450): error C3861: 'pC': identifier not found, even with argument-dependent lookup
ZMyCharacter.cpp(3450): error C2227: left of '->AddParameter' must point to class/struct/union
type is ''unknown-type''
ZMyCharacter.cpp(3450): error C3861: 'pC': identifier not found, even with argument-dependent lookup
ZMyCharacter.cpp(3450): error C2227: left of '->AddParameter' must point to class/struct/union
type is ''unknown-type''
ZMyCharacter.cpp(3450): error C3861: 'pC': identifier not found, even with argument-dependent lookup
ZMyCharacter.cpp(3450): error C3861: 'pC': identifier not found, even with argument-dependent lookup
ZMyCharacter.cpp(3457): error C3861: 'MCommand': identifier not found, even with argument-dependent lookup
ZMyCharacter.cpp(3457): error C3861: 'pC': identifier not found, even with argument-dependent lookup
ZMyCharacter.cpp(3457): error C2227: left of '->AddParameter' must point to class/struct/union
type is ''unknown-type''
ZMyCharacter.cpp(3457): error C3861: 'pC': identifier not found, even with argument-dependent lookup
ZMyCharacter.cpp(3457): error C2227: left of '->AddParameter' must point to class/struct/union
type is ''unknown-type''
ZMyCharacter.cpp(3457): error C3861: 'pC': identifier not found, even with argument-dependent lookup
ZMyCharacter.cpp(3457): error C2227: left of '->AddParameter' must point to class/struct/union
type is ''unknown-type''
ZMyCharacter.cpp(3457): error C3861: 'pC': identifier not found, even with argument-dependent lookup
ZMyCharacter.cpp(3457): error C3861: 'pC': identifier not found, even with argument-dependent lookup
ZOptionInterface.cpp(228): error C2065: 'pComboBox' : undeclared identifier
ZOptionInterface.cpp(229): error C2143: syntax error : missing ';' before 'if'
ZOptionInterface.cpp(229): error C3861: 'pComboBox': identifier not found, even with argument-dependent lookup
ZOptionInterface.cpp(231): error C2227: left of '->SetSelIndex' must point to class/struct/union
type is ''unknown-type''
ZOptionInterface.cpp(231): error C3861: 'pComboBox': identifier not found, even with argument-dependent lookup
ZOptionInterface.cpp(740): error C2143: syntax error : missing ';' before 'if'
ZOptionInterface.cpp(739): error C3861: 'pComboBox': identifier not found, even with argument-dependent lookup
ZOptionInterface.cpp(740): error C3861: 'pComboBox': identifier not found, even with argument-dependent lookup
ZOptionInterface.cpp(742): error C2227: left of '->GetSelIndex' must point to class/struct/union
type is ''unknown-type''
ZOptionInterface.cpp(742): error C3861: 'pComboBox': identifier not found, even with argument-dependent lookup

o_O how much errors i follow ur tutorial step by step :(
 
Joined
Jan 9, 2009
Messages
614
Reaction score
152
ZMyCharacter.cpp(2968): error C2017: illegal escape sequence
ZMyCharacter.cpp(2968): error C2017: illegal escape sequence
ZMyCharacter.cpp(2968): error C2059: syntax error : '('
ZMyCharacter.cpp(2968): error C2039: 'MCommand' : is not a member of 'ZPACKEDDASHINFO'
ZPost.h(35) : see declaration of 'ZPACKEDDASHINFO'
ZMyCharacter.cpp(2968): error C2039: 'pC' : is not a member of 'ZPACKEDDASHINFO'
ZPost.h(35) : see declaration of 'ZPACKEDDASHINFO'
ZMyCharacter.cpp(2968): error C2039: 'ZNewCmd' : is not a member of 'ZPACKEDDASHINFO'
ZPost.h(35) : see declaration of 'ZPACKEDDASHINFO'
ZMyCharacter.cpp(2968): error C2039: 'UncloakCmdId' : is not a member of 'ZPACKEDDASHINFO'
ZPost.h(35) : see declaration of 'ZPACKEDDASHINFO'
ZMyCharacter.cpp(2968): error C2039: 'pC' : is not a member of 'ZPACKEDDASHINFO'
ZPost.h(35) : see declaration of 'ZPACKEDDASHINFO'
ZMyCharacter.cpp(2968): error C2039: 'AddParameter' : is not a member of 'ZPACKEDDASHINFO'
ZPost.h(35) : see declaration of 'ZPACKEDDASHINFO'
ZMyCharacter.cpp(2968): error C3861: 'pC': identifier not found, even with argument-dependent lookup
ZMyCharacter.cpp(3431): error C3861: 'MCommand': identifier not found, even with argument-dependent lookup
ZMyCharacter.cpp(3431): error C3861: 'pC': identifier not found, even with argument-dependent lookup
ZMyCharacter.cpp(3431): error C2227: left of '->AddParameter' must point to class/struct/union
type is ''unknown-type''
ZMyCharacter.cpp(3431): error C3861: 'pC': identifier not found, even with argument-dependent lookup
ZMyCharacter.cpp(3431): error C2227: left of '->AddParameter' must point to class/struct/union
type is ''unknown-type''
ZMyCharacter.cpp(3431): error C3861: 'pC': identifier not found, even with argument-dependent lookup
ZMyCharacter.cpp(3431): error C2227: left of '->AddParameter' must point to class/struct/union
type is ''unknown-type''
ZMyCharacter.cpp(3431): error C3861: 'pC': identifier not found, even with argument-dependent lookup
ZMyCharacter.cpp(3431): error C3861: 'pC': identifier not found, even with argument-dependent lookup
ZMyCharacter.cpp(3447): error C3861: 'MCommand': identifier not found, even with argument-dependent lookup
ZMyCharacter.cpp(3447): error C3861: 'pC': identifier not found, even with argument-dependent lookup
ZMyCharacter.cpp(3447): error C2227: left of '->AddParameter' must point to class/struct/union
type is ''unknown-type''
ZMyCharacter.cpp(3447): error C3861: 'pC': identifier not found, even with argument-dependent lookup
ZMyCharacter.cpp(3447): error C2227: left of '->AddParameter' must point to class/struct/union
type is ''unknown-type''
ZMyCharacter.cpp(3447): error C3861: 'pC': identifier not found, even with argument-dependent lookup
ZMyCharacter.cpp(3447): error C2227: left of '->AddParameter' must point to class/struct/union
type is ''unknown-type''
c:\Users\Sahar\Desktop\Source\Source\Source_Code\Stable\Gunz\ZMyCharacter.cpp(3447): error C3861: 'pC': identifier not found, even with argument-dependent lookup
ZMyCharacter.cpp(3447): error C3861: 'pC': identifier not found, even with argument-dependent lookup
ZMyCharacter.cpp(3450): error C3861: 'MCommand': identifier not found, even with argument-dependent lookup
ZMyCharacter.cpp(3450): error C3861: 'pC': identifier not found, even with argument-dependent lookup
ZMyCharacter.cpp(3450): error C2227: left of '->AddParameter' must point to class/struct/union
type is ''unknown-type''
ZMyCharacter.cpp(3450): error C3861: 'pC': identifier not found, even with argument-dependent lookup
ZMyCharacter.cpp(3450): error C2227: left of '->AddParameter' must point to class/struct/union
type is ''unknown-type''
ZMyCharacter.cpp(3450): error C3861: 'pC': identifier not found, even with argument-dependent lookup
ZMyCharacter.cpp(3450): error C2227: left of '->AddParameter' must point to class/struct/union
type is ''unknown-type''
ZMyCharacter.cpp(3450): error C3861: 'pC': identifier not found, even with argument-dependent lookup
ZMyCharacter.cpp(3450): error C3861: 'pC': identifier not found, even with argument-dependent lookup
ZMyCharacter.cpp(3457): error C3861: 'MCommand': identifier not found, even with argument-dependent lookup
ZMyCharacter.cpp(3457): error C3861: 'pC': identifier not found, even with argument-dependent lookup
ZMyCharacter.cpp(3457): error C2227: left of '->AddParameter' must point to class/struct/union
type is ''unknown-type''
ZMyCharacter.cpp(3457): error C3861: 'pC': identifier not found, even with argument-dependent lookup
ZMyCharacter.cpp(3457): error C2227: left of '->AddParameter' must point to class/struct/union
type is ''unknown-type''
ZMyCharacter.cpp(3457): error C3861: 'pC': identifier not found, even with argument-dependent lookup
ZMyCharacter.cpp(3457): error C2227: left of '->AddParameter' must point to class/struct/union
type is ''unknown-type''
ZMyCharacter.cpp(3457): error C3861: 'pC': identifier not found, even with argument-dependent lookup
ZMyCharacter.cpp(3457): error C3861: 'pC': identifier not found, even with argument-dependent lookup
ZOptionInterface.cpp(228): error C2065: 'pComboBox' : undeclared identifier
ZOptionInterface.cpp(229): error C2143: syntax error : missing ';' before 'if'
ZOptionInterface.cpp(229): error C3861: 'pComboBox': identifier not found, even with argument-dependent lookup
ZOptionInterface.cpp(231): error C2227: left of '->SetSelIndex' must point to class/struct/union
type is ''unknown-type''
ZOptionInterface.cpp(231): error C3861: 'pComboBox': identifier not found, even with argument-dependent lookup
ZOptionInterface.cpp(740): error C2143: syntax error : missing ';' before 'if'
ZOptionInterface.cpp(739): error C3861: 'pComboBox': identifier not found, even with argument-dependent lookup
ZOptionInterface.cpp(740): error C3861: 'pComboBox': identifier not found, even with argument-dependent lookup
ZOptionInterface.cpp(742): error C2227: left of '->GetSelIndex' must point to class/struct/union
type is ''unknown-type''
ZOptionInterface.cpp(742): error C3861: 'pComboBox': identifier not found, even with argument-dependent lookup

o_O how much errors i follow ur tutorial step by step :(

Try changing #define ZPostDash to inline void ZPostDash and uncommenting the commented lines in the prototype, that'll fix one issue. The other issue is b/c you need to declare MComboBox* before pComboBox. It depends on where you put the code.
 
Newbie Spellweaver
Joined
Apr 29, 2015
Messages
75
Reaction score
6
ok i add this to sfx.mrs / interface.mrs / source and ingame it's dosent change the color from the normal i renamed the widget to DashColor and i still no work also i try to change to nDashColor
 
Experienced Elementalist
Joined
May 12, 2014
Messages
263
Reaction score
62
Hello friend I have a problem in the dash source that provided it that I can give Stand
 
Experienced Elementalist
Joined
May 12, 2014
Messages
263
Reaction score
62
los mismos bug que el
ZMyCharacter.cpp(2968): error C2017: illegal escape sequence
ZMyCharacter.cpp(2968): error C2017: illegal escape sequence
ZMyCharacter.cpp(2968): error C2059: syntax error : '('
ZMyCharacter.cpp(2968): error C2039: 'MCommand' : is not a member of 'ZPACKEDDASHINFO'
ZPost.h(35) : see declaration of 'ZPACKEDDASHINFO'
ZMyCharacter.cpp(2968): error C2039: 'pC' : is not a member of 'ZPACKEDDASHINFO'
ZPost.h(35) : see declaration of 'ZPACKEDDASHINFO'
ZMyCharacter.cpp(2968): error C2039: 'ZNewCmd' : is not a member of 'ZPACKEDDASHINFO'
ZPost.h(35) : see declaration of 'ZPACKEDDASHINFO'
ZMyCharacter.cpp(2968): error C2039: 'UncloakCmdId' : is not a member of 'ZPACKEDDASHINFO'
ZPost.h(35) : see declaration of 'ZPACKEDDASHINFO'
ZMyCharacter.cpp(2968): error C2039: 'pC' : is not a member of 'ZPACKEDDASHINFO'
ZPost.h(35) : see declaration of 'ZPACKEDDASHINFO'
ZMyCharacter.cpp(2968): error C2039: 'AddParameter' : is not a member of 'ZPACKEDDASHINFO'
ZPost.h(35) : see declaration of 'ZPACKEDDASHINFO'
ZMyCharacter.cpp(2968): error C3861: 'pC': identifier not found, even with argument-dependent lookup
ZMyCharacter.cpp(3431): error C3861: 'MCommand': identifier not found, even with argument-dependent lookup
ZMyCharacter.cpp(3431): error C3861: 'pC': identifier not found, even with argument-dependent lookup
ZMyCharacter.cpp(3431): error C2227: left of '->AddParameter' must point to class/struct/union
type is ''unknown-type''
ZMyCharacter.cpp(3431): error C3861: 'pC': identifier not found, even with argument-dependent lookup
ZMyCharacter.cpp(3431): error C2227: left of '->AddParameter' must point to class/struct/union
type is ''unknown-type''
ZMyCharacter.cpp(3431): error C3861: 'pC': identifier not found, even with argument-dependent lookup
ZMyCharacter.cpp(3431): error C2227: left of '->AddParameter' must point to class/struct/union
type is ''unknown-type''
ZMyCharacter.cpp(3431): error C3861: 'pC': identifier not found, even with argument-dependent lookup
ZMyCharacter.cpp(3431): error C3861: 'pC': identifier not found, even with argument-dependent lookup
ZMyCharacter.cpp(3447): error C3861: 'MCommand': identifier not found, even with argument-dependent lookup
ZMyCharacter.cpp(3447): error C3861: 'pC': identifier not found, even with argument-dependent lookup
ZMyCharacter.cpp(3447): error C2227: left of '->AddParameter' must point to class/struct/union
type is ''unknown-type''
ZMyCharacter.cpp(3447): error C3861: 'pC': identifier not found, even with argument-dependent lookup
ZMyCharacter.cpp(3447): error C2227: left of '->AddParameter' must point to class/struct/union
type is ''unknown-type''
ZMyCharacter.cpp(3447): error C3861: 'pC': identifier not found, even with argument-dependent lookup
ZMyCharacter.cpp(3447): error C2227: left of '->AddParameter' must point to class/struct/union
type is ''unknown-type''
c:\Users\Sahar\Desktop\Source\Source\Source_Code\Stable\Gunz\ZMyCharacter.cpp(3447): error C3861: 'pC': identifier not found, even with argument-dependent lookup
ZMyCharacter.cpp(3447): error C3861: 'pC': identifier not found, even with argument-dependent lookup
ZMyCharacter.cpp(3450): error C3861: 'MCommand': identifier not found, even with argument-dependent lookup
ZMyCharacter.cpp(3450): error C3861: 'pC': identifier not found, even with argument-dependent lookup
ZMyCharacter.cpp(3450): error C2227: left of '->AddParameter' must point to class/struct/union
type is ''unknown-type''
ZMyCharacter.cpp(3450): error C3861: 'pC': identifier not found, even with argument-dependent lookup
ZMyCharacter.cpp(3450): error C2227: left of '->AddParameter' must point to class/struct/union
type is ''unknown-type''
ZMyCharacter.cpp(3450): error C3861: 'pC': identifier not found, even with argument-dependent lookup
ZMyCharacter.cpp(3450): error C2227: left of '->AddParameter' must point to class/struct/union
type is ''unknown-type''
ZMyCharacter.cpp(3450): error C3861: 'pC': identifier not found, even with argument-dependent lookup
ZMyCharacter.cpp(3450): error C3861: 'pC': identifier not found, even with argument-dependent lookup
ZMyCharacter.cpp(3457): error C3861: 'MCommand': identifier not found, even with argument-dependent lookup
ZMyCharacter.cpp(3457): error C3861: 'pC': identifier not found, even with argument-dependent lookup
ZMyCharacter.cpp(3457): error C2227: left of '->AddParameter' must point to class/struct/union
type is ''unknown-type''
ZMyCharacter.cpp(3457): error C3861: 'pC': identifier not found, even with argument-dependent lookup
ZMyCharacter.cpp(3457): error C2227: left of '->AddParameter' must point to class/struct/union
type is ''unknown-type''
ZMyCharacter.cpp(3457): error C3861: 'pC': identifier not found, even with argument-dependent lookup
ZMyCharacter.cpp(3457): error C2227: left of '->AddParameter' must point to class/struct/union
type is ''unknown-type''
ZMyCharacter.cpp(3457): error C3861: 'pC': identifier not found, even with argument-dependent lookup
ZMyCharacter.cpp(3457): error C3861: 'pC': identifier not found, even with argument-dependent lookup
ZOptionInterface.cpp(228): error C2065: 'pComboBox' : undeclared identifier
ZOptionInterface.cpp(229): error C2143: syntax error : missing ';' before 'if'
ZOptionInterface.cpp(229): error C3861: 'pComboBox': identifier not found, even with argument-dependent lookup
ZOptionInterface.cpp(231): error C2227: left of '->SetSelIndex' must point to class/struct/union
type is ''unknown-type''
ZOptionInterface.cpp(231): error C3861: 'pComboBox': identifier not found, even with argument-dependent lookup
ZOptionInterface.cpp(740): error C2143: syntax error : missing ';' before 'if'
ZOptionInterface.cpp(739): error C3861: 'pComboBox': identifier not found, even with argument-dependent lookup
ZOptionInterface.cpp(740): error C3861: 'pComboBox': identifier not found, even with argument-dependent lookup
ZOptionInterface.cpp(742): error C2227: left of '->GetSelIndex' must point to class/struct/union
type is ''unknown-type''
ZOptionInterface.cpp(742): error C3861: 'pComboBox': identifier not found, even with argument-dependent lookup
 
Joined
Jan 9, 2009
Messages
614
Reaction score
152
los mismos bug que el
ZMyCharacter.cpp(2968): error C2017: illegal escape sequence
ZMyCharacter.cpp(2968): error C2017: illegal escape sequence
ZMyCharacter.cpp(2968): error C2059: syntax error : '('
ZMyCharacter.cpp(2968): error C2039: 'MCommand' : is not a member of 'ZPACKEDDASHINFO'
ZPost.h(35) : see declaration of 'ZPACKEDDASHINFO'
ZMyCharacter.cpp(2968): error C2039: 'pC' : is not a member of 'ZPACKEDDASHINFO'
ZPost.h(35) : see declaration of 'ZPACKEDDASHINFO'
ZMyCharacter.cpp(2968): error C2039: 'ZNewCmd' : is not a member of 'ZPACKEDDASHINFO'
ZPost.h(35) : see declaration of 'ZPACKEDDASHINFO'
ZMyCharacter.cpp(2968): error C2039: 'UncloakCmdId' : is not a member of 'ZPACKEDDASHINFO'
ZPost.h(35) : see declaration of 'ZPACKEDDASHINFO'
ZMyCharacter.cpp(2968): error C2039: 'pC' : is not a member of 'ZPACKEDDASHINFO'
ZPost.h(35) : see declaration of 'ZPACKEDDASHINFO'
ZMyCharacter.cpp(2968): error C2039: 'AddParameter' : is not a member of 'ZPACKEDDASHINFO'
ZPost.h(35) : see declaration of 'ZPACKEDDASHINFO'
ZMyCharacter.cpp(2968): error C3861: 'pC': identifier not found, even with argument-dependent lookup
ZMyCharacter.cpp(3431): error C3861: 'MCommand': identifier not found, even with argument-dependent lookup
ZMyCharacter.cpp(3431): error C3861: 'pC': identifier not found, even with argument-dependent lookup
ZMyCharacter.cpp(3431): error C2227: left of '->AddParameter' must point to class/struct/union
type is ''unknown-type''
ZMyCharacter.cpp(3431): error C3861: 'pC': identifier not found, even with argument-dependent lookup
ZMyCharacter.cpp(3431): error C2227: left of '->AddParameter' must point to class/struct/union
type is ''unknown-type''
ZMyCharacter.cpp(3431): error C3861: 'pC': identifier not found, even with argument-dependent lookup
ZMyCharacter.cpp(3431): error C2227: left of '->AddParameter' must point to class/struct/union
type is ''unknown-type''
ZMyCharacter.cpp(3431): error C3861: 'pC': identifier not found, even with argument-dependent lookup
ZMyCharacter.cpp(3431): error C3861: 'pC': identifier not found, even with argument-dependent lookup
ZMyCharacter.cpp(3447): error C3861: 'MCommand': identifier not found, even with argument-dependent lookup
ZMyCharacter.cpp(3447): error C3861: 'pC': identifier not found, even with argument-dependent lookup
ZMyCharacter.cpp(3447): error C2227: left of '->AddParameter' must point to class/struct/union
type is ''unknown-type''
ZMyCharacter.cpp(3447): error C3861: 'pC': identifier not found, even with argument-dependent lookup
ZMyCharacter.cpp(3447): error C2227: left of '->AddParameter' must point to class/struct/union
type is ''unknown-type''
ZMyCharacter.cpp(3447): error C3861: 'pC': identifier not found, even with argument-dependent lookup
ZMyCharacter.cpp(3447): error C2227: left of '->AddParameter' must point to class/struct/union
type is ''unknown-type''
c:\Users\Sahar\Desktop\Source\Source\Source_Code\Stable\Gunz\ZMyCharacter.cpp(3447): error C3861: 'pC': identifier not found, even with argument-dependent lookup
ZMyCharacter.cpp(3447): error C3861: 'pC': identifier not found, even with argument-dependent lookup
ZMyCharacter.cpp(3450): error C3861: 'MCommand': identifier not found, even with argument-dependent lookup
ZMyCharacter.cpp(3450): error C3861: 'pC': identifier not found, even with argument-dependent lookup
ZMyCharacter.cpp(3450): error C2227: left of '->AddParameter' must point to class/struct/union
type is ''unknown-type''
ZMyCharacter.cpp(3450): error C3861: 'pC': identifier not found, even with argument-dependent lookup
ZMyCharacter.cpp(3450): error C2227: left of '->AddParameter' must point to class/struct/union
type is ''unknown-type''
ZMyCharacter.cpp(3450): error C3861: 'pC': identifier not found, even with argument-dependent lookup
ZMyCharacter.cpp(3450): error C2227: left of '->AddParameter' must point to class/struct/union
type is ''unknown-type''
ZMyCharacter.cpp(3450): error C3861: 'pC': identifier not found, even with argument-dependent lookup
ZMyCharacter.cpp(3450): error C3861: 'pC': identifier not found, even with argument-dependent lookup
ZMyCharacter.cpp(3457): error C3861: 'MCommand': identifier not found, even with argument-dependent lookup
ZMyCharacter.cpp(3457): error C3861: 'pC': identifier not found, even with argument-dependent lookup
ZMyCharacter.cpp(3457): error C2227: left of '->AddParameter' must point to class/struct/union
type is ''unknown-type''
ZMyCharacter.cpp(3457): error C3861: 'pC': identifier not found, even with argument-dependent lookup
ZMyCharacter.cpp(3457): error C2227: left of '->AddParameter' must point to class/struct/union
type is ''unknown-type''
ZMyCharacter.cpp(3457): error C3861: 'pC': identifier not found, even with argument-dependent lookup
ZMyCharacter.cpp(3457): error C2227: left of '->AddParameter' must point to class/struct/union
type is ''unknown-type''
ZMyCharacter.cpp(3457): error C3861: 'pC': identifier not found, even with argument-dependent lookup
ZMyCharacter.cpp(3457): error C3861: 'pC': identifier not found, even with argument-dependent lookup
ZOptionInterface.cpp(228): error C2065: 'pComboBox' : undeclared identifier
ZOptionInterface.cpp(229): error C2143: syntax error : missing ';' before 'if'
ZOptionInterface.cpp(229): error C3861: 'pComboBox': identifier not found, even with argument-dependent lookup
ZOptionInterface.cpp(231): error C2227: left of '->SetSelIndex' must point to class/struct/union
type is ''unknown-type''
ZOptionInterface.cpp(231): error C3861: 'pComboBox': identifier not found, even with argument-dependent lookup
ZOptionInterface.cpp(740): error C2143: syntax error : missing ';' before 'if'
ZOptionInterface.cpp(739): error C3861: 'pComboBox': identifier not found, even with argument-dependent lookup
ZOptionInterface.cpp(740): error C3861: 'pComboBox': identifier not found, even with argument-dependent lookup
ZOptionInterface.cpp(742): error C2227: left of '->GetSelIndex' must point to class/struct/union
type is ''unknown-type''
ZOptionInterface.cpp(742): error C3861: 'pComboBox': identifier not found, even with argument-dependent lookup

Okay, lets read through where the errors are occuring. ZMyCharacter indicates a syntax error of '(', so go to the line that it indicates has the syntax error and correct it. ZOptionInterface, the error there is a undeclared identifier, meaning you need to put MComboBox* before pComboBox.ZPost I'll let you figure out, these errors aren't hard to fix if you read the warnings/errors that the compiler gives you.
 
Initiate Mage
Joined
Feb 7, 2016
Messages
1
Reaction score
0
Try changing #define ZPostDash to inline void ZPostDash and uncommenting the commented lines in the prototype, that'll fix one issue. The other issue is b/c you need to declare MComboBox* before pComboBox. It depends on where you put the code.
I don't understand this,could you please explain ? I'm already understand this
You means:
#define ZPostDash(rvector& vPos, rvector& vDir, unsigned char sel_type, int nDashColor) { \
Remove the /* */ ?
MComboBox* pComboBox = (MComboBox*)pResource->FindWidget("DashColor")
if(pComboBox)
{
pComboBox->SetSelIndex(Z_VIDEO_DASH);
}
 
Junior Spellweaver
Joined
Jun 14, 2015
Messages
123
Reaction score
20
hay, wrote some short code to dynamically recolor effects via color blending since doing it manually for each file is pretty tedious, tot someone might find it useful

add this awful hack in RMeshNode::Render, just above the RenderIndex* calls:

Code:
        extern uint32_t BlendColor;


        if (BlendColor)
        {
            RGetDevice()->SetTextureStageState(0, D3DTSS_COLOROP, D3DTOP_MODULATE);
            RGetDevice()->SetTextureStageState(0, D3DTSS_COLORARG1, D3DTA_TEXTURE);
            RGetDevice()->SetTextureStageState(0, D3DTSS_COLORARG2, D3DTA_CONSTANT);
            RGetDevice()->SetTextureStageState(0, D3DTSS_CONSTANT, BlendColor);
        }

effect wrapper, put somewhere in the top of ZEffectManager.cpp:

Code:
uint32_t BlendColor = 0;


template <typename T, typename T2>
class TexBlendEffect : public T
{
    T2 Get;
public:


    template <typename... Args>
    TexBlendEffect(T2 fn, Args... args) : Get(fn), T(args...)
    {
    }


    virtual ~TexBlendEffect() override
    {
    }


    virtual bool Draw(unsigned long int nTime) override
    {
        uint32_t Color = Get();
        
        BlendColor = Color;


        auto ret = T::Draw(nTime);


        BlendColor = 0;


        return ret;
    }
};


template <typename T, typename T2, typename... ArgsType>
TexBlendEffect<T, T2>* MakeTexBlendEffect(T2 fn, ArgsType... args)
{
    return new TexBlendEffect<T, T2>(fn, args...);
}

some sample code to make the color of the charging effect shift across the color wheel:

Code:
void ZEffectManager::AddChargingEffect( ZObject *pObj )
{
    rvector TargetNormal = rvector(1,0,0);


    ZEffectCharging* pNew;


    if (true)
    {
        hsv HSVColor;
        HSVColor.h = rand() % 360;
        HSVColor.s = 1.0;
        HSVColor.v = 1.0;


        auto GetColor = [HSVColor]() mutable
        {
            double Delta = GetElapsedTime();


            HSVColor.h += 360.0 / 2.0 * Delta; // Half a revolution per second
            HSVColor.h = fmod(HSVColor.h, 360.0);


            rgb RGBColor = hsv2rgb(HSVColor);


            uint32_t Color = 0xFF000000 | (int(RGBColor.r * 255) << 16) | (int(RGBColor.g * 255) << 8) | int(RGBColor.b * 255);


            return Color;
        };


        pNew = MakeTexBlendEffect<ZEffectCharging>(GetColor, m_pChargingEffect, pObj->m_Position, TargetNormal, pObj);
    }
    else
        pNew = new ZEffectCharging(m_pChargingEffect, pObj->m_Position, TargetNormal, pObj);


    pNew->SetAlignType(1);
    Add(pNew);
}

applied to all the massive-related effects, the result looks like
 
Last edited:
Back
Top