neo22
Member
|
RE: Error after update
Same problem here
it's happen in the editor when attempt to "play last build" and create a "mini map", but it's also happen in game.
(This post was last modified: 09-27-2011 11:29 AM by neo22.)
|
|
09-27-2011 11:27 AM |
|
Esenthel
Administrator
|
RE: Error after update
thanks, I'll fix this quickly
|
|
09-27-2011 12:13 PM |
|
Harry
Member
|
RE: Error after update
It works now, thanks but now my codes can't compile:
Code:
Reference<Chr> owner;
if(AI *chr=CAST(AI,objs[i]))
{
if((owner!=chr....
Code:
1>d:\microsoft visual studio 9.0\vc\include\esenthelengine\misc\reference.h(18) : error C2446: '!=' : no conversion from 'AI *const *' to 'Chr *const '
1> Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
1> d:\forest valley\source\bullet.cpp(41) : see reference to function template instantiation 'Bool EE::Reference<TYPE>::operator !=<AI*>(const OBJECT &) const' being compiled
1> with
1> [
1> TYPE=Chr,
1> OBJECT=AI *
1> ]
1>d:\microsoft visual studio 9.0\vc\include\esenthelengine\misc\reference.h(18) : error C2040: '!=' : 'Chr *const ' differs in levels of indirection from 'AI *const *'
1>d:\microsoft visual studio 9.0\vc\include\esenthelengine\misc\reference.h(18) : error C2228: left of '.id' must have class/struct/union
1> type is 'AI *const '
1> did you intend to use '->' instead?
Should I change AI to Chr? Is there any changes in the latest update in references?
|
|
09-27-2011 06:51 PM |
|
Esenthel
Administrator
|
RE: Error after update
thanks, you can replace to these codes the EE misc reference.h (they're without C)
Code:
// compare
T1(OBJECT) Bool operator==(OBJECT &object)C {return T._object== &object && T._object_id== object .id() ;} // if reference points to 'object'
T1(OBJECT) Bool operator==(OBJECT *object)C {return T._object== object && (object ? T._object_id== object->id() : true );} // if reference points to 'object'
T1(TYPE2 ) Bool operator==(Reference<TYPE2> &ref )C {return T._object==ref._object && T._object_id==ref._object_id ;} // if references are equal
T1(OBJECT) Bool operator!=(OBJECT &object)C {return T._object!= &object || T._object_id!= object .id() ;} // if reference doesn't point to 'object'
T1(OBJECT) Bool operator!=(OBJECT *object)C {return T._object!= object || (object ? T._object_id!= object->id() : false);} // if reference doesn't point to 'object'
T1(TYPE2 ) Bool operator!=(Reference<TYPE2> &ref )C {return T._object!=ref._object || T._object_id!=ref._object_id ;} // if references are not equal
|
|
09-27-2011 07:01 PM |
|
Harry
Member
|
RE: Error after update
Ok thanks It compiles now.
|
|
09-27-2011 07:33 PM |
|