About Store Forum Documentation Contact
Donations:
392$/mo



Post Reply 
This used to work...
Author Message
aceio76 Offline
Silver Supporter

Post: #1
This used to work...
Code:
for(Game::ObjParamsPtr op=obj; op; op=op->base())
         if(CChar *op_file_name=Game::Objs.)
            if(icon.get(GetExtNot(op_file_name)+".ico.gfx"))
               ...more code...;

but now I get an error on compile:
Code:
1>c:\dev\game\client\item.cpp(34) : error C2664: 'EE::Game::ObjParams *EE::CacheCounted<TYPE,CACHE>::operator ()(const EE::Str &,CChar *)' : cannot convert parameter 1 from 'EE::Game::ObjParamsPtr' to 'const EE::Str &'
1>        with
1>        [
1>            TYPE=EE::Game::ObjParams,
1>            CACHE=_Objs
1>        ]
1>        Reason: cannot convert from 'EE::Game::ObjParamsPtr' to 'const EE::Str'
1>        No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called

What changed? How do I now enumerate to find the file name?

www.thinkplaystudios.com
09-15-2011 10:26 PM
Visit this user's website Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #2
RE: This used to work...
09-15-2011 11:01 PM
Find all posts by this user Quote this message in a reply
Harry Offline
Member

Post: #3
RE: This used to work...
This line:

Code:
if(CChar *op_file_name=Game::Objs.)

to:

Code:
if(CChar *op_file_name=Game::Objs.name(op))

and should work.

And also shoudn't in for be op=&obj except op=obj?
09-15-2011 11:02 PM
Visit this user's website Find all posts by this user Quote this message in a reply
aceio76 Offline
Silver Supporter

Post: #4
RE: This used to work...
Oh nuts, I did do an update. Now it makes sense. That's why it works with another developer. Thank you.
(09-15-2011 11:02 PM)Harry Wrote:  
Code:
if(CChar *op_file_name=Game::Objs.name(op))
This was the only way I had it working on my laptop, but not on the other. Which at first was confusing.

Quote:And also shoudn't in for be op=&obj except op=obj?
Not really, I only need to iterate.

Thanks for all the help.

www.thinkplaystudios.com
(This post was last modified: 09-15-2011 11:57 PM by aceio76.)
09-15-2011 11:32 PM
Visit this user's website Find all posts by this user Quote this message in a reply
Post Reply