Timer with a chat class command? [message #377350] |
Tue, 24 March 2009 21:13 |
|
whtdrgnpl
Messages: 17 Registered: July 2007
Karma: 0
|
Recruit |
|
|
How do I use a timer with a chat class command? I've been trying to use this on one of them:
Commands->Start_Timer(obj,this,3.0f,1);
but I keep getting this error:
1>.\RTSplugin.cpp(2738) : error C2664: 'void (GameObject *,ScriptClass *,float,int)' : cannot convert parameter 2 from 'BuildCommand *const ' to 'ScriptClass *'
1> Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
1>.\RTSplugin.cpp(2738) : error C2664: 'void (GameObject *,ScriptClass *,float,int)' : cannot convert parameter 1 from 'int' to 'GameObject *'
1> Conversion from integral type to pointer type requires reinterpret_cast, C-style cast or function-style cast
|
|
|
Re: Timer with a chat class command? [message #377351 is a reply to message #377350] |
Tue, 24 March 2009 21:36 |
nopol10
Messages: 1043 Registered: February 2005 Location: Singapore
Karma: 0
|
General (1 Star) |
|
|
You have to make a ScriptImpClass script with a Timer_Expired event and attach that script to an invisible object. Put whatever you need it to run in the Timer_Expired.
nopol10=Nopol=nopol(GSA)
|
|
|
Re: Timer with a chat class command? [message #377357 is a reply to message #377350] |
Wed, 25 March 2009 00:33 |
|
jnz
Messages: 3396 Registered: July 2006 Location: 30th century
Karma: 0
|
General (3 Stars) |
|
|
whtdrgnpl wrote on Wed, 25 March 2009 04:13 | How do I use a timer with a chat class command? I've been trying to use this on one of them:
Commands->Start_Timer(obj,this,3.0f,1);
but I keep getting this error:
1>.\RTSplugin.cpp(2738) : error C2664: 'void (GameObject *,ScriptClass *,float,int)' : cannot convert parameter 2 from 'BuildCommand *const ' to 'ScriptClass *'
1> Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
1>.\RTSplugin.cpp(2738) : error C2664: 'void (GameObject *,ScriptClass *,float,int)' : cannot convert parameter 1 from 'int' to 'GameObject *'
1> Conversion from integral type to pointer type requires reinterpret_cast, C-style cast or function-style cast
|
You can't, the chat command class has nothing to do with ScriptImpClass
|
|
|
|