How could i fix the new problem :Con::executef`s arg change
by FanZhang · in Torque Game Engine Advanced · 05/06/2009 (12:42 pm) · 4 replies
in TGEA 1.5 that this function Con::executef(getDataBlock(), 2, name, scriptThis());could work well,but in TGEA 1.7 that i got a error below:
1>f:\tgea\tgea_1_7_0\engine\source\t3d\airepairshipflyingvehicle.cpp(257) : error C2665: 'Con::executef' : none of the 20 overloads could convert all the argument types
1> f:\tgea\tgea_1_7_0\engine\source\console\console.h(532): could be 'const char *Con::executef(const char *,const char *,const char *,const char *)'
1> f:\tgea\tgea_1_7_0\engine\source\console\console.h(560): or 'const char *Con::executef(SimObject *,const char *,const char *,const char *)'
1> while trying to match the argument list '(GameBaseData *, int, const char *, const char *)'
if i change the num arg 2 into "2",that would not work right.
How could i fix it. Thank you :)
1>f:\tgea\tgea_1_7_0\engine\source\t3d\airepairshipflyingvehicle.cpp(257) : error C2665: 'Con::executef' : none of the 20 overloads could convert all the argument types
1> f:\tgea\tgea_1_7_0\engine\source\console\console.h(532): could be 'const char *Con::executef(const char *,const char *,const char *,const char *)'
1> f:\tgea\tgea_1_7_0\engine\source\console\console.h(560): or 'const char *Con::executef(SimObject *,const char *,const char *,const char *)'
1> while trying to match the argument list '(GameBaseData *, int, const char *, const char *)'
if i change the num arg 2 into "2",that would not work right.
How could i fix it. Thank you :)
About the author
Recent Threads
#2
See the Quick Guide Porting Tips (to TGEA 1.7.0).
Hope this helps.
05/06/2009 (12:56 pm)
Con::executef() changed in TGEA 1.7:Quote:
13) Con::executef() only takes char variables now.
eg. Con::executef( getDataBlock(), 2, name, scriptThis()); changes to Con::executef( getDataBlock(), name, scriptThis());
See the Quick Guide Porting Tips (to TGEA 1.7.0).
Hope this helps.
#3
05/07/2009 (1:27 am)
Thank for your solution,I followed your advices and now it works well:)
#4
05/14/2009 (10:02 am)
You would technically need a license to effect those changes. I say that because you don't appear to be an owner.
Associate Orion Elenzil
Real Life Plus
it looks like it's not sure if getDataBlock() is a const char* or a SimObject*, which afaik would only happen if it were a void*.