Renegade Public Forums
C&C: Renegade --> Dying since 2003™, resurrected in 2024!
Home » Renegade Discussions » Mod Forum » Having problems with C++
Re: Having problems with C++ [message #335840 is a reply to message #335837] Wed, 18 June 2008 13:25 Go to previous messageGo to previous message
HeavyX101- Left is currently offline  HeavyX101- Left
Messages: 633
Registered: April 2008
Location: WindowsJail=ZipFolder
Karma:
Colonel
Ok, this is what i did now:
class jailChatCommand : public ChatCommandClass {
void Triggered(int ID,const TokenClass &Text,int ChatType) {
if (!Text[1].empty() ) {
      const char *pris = Get_Player_Name(Get_Part_Name(Text[1].c_str())); 
GameObject *obj = Get_GameObj(pris);
	int x = 100054;
GameObject *gotoObject = Commands->Find_Object(x);
		 Vector3 gotoLocation = Commands->Get_Position(gotoObject);
 		Commands->Set_Position(obj,gotoLocation);
			Change_Character(obj,"GDI_Prisoner_v0a");
             Commands->Set_Shield_Type(obj,"Blamo");
			       Console_Input(StrFormat("cmsg 166,149,56 [BSS: %d Has Been Arrested ]", Get_Player_ID(Get_Part_Name(Text[1].c_str()))).c_str());

}
else {
Console_Input(StrFormat("ppage %d ERROR!",ID).c_str());
}
}
};
ChatCommandRegistrant<jailChatCommand> jailChatCommandReg("!jail;!j",CHATTYPE_ALL,1,GAMEMODE_AOW);


I get this error:
Quote:

Error 1 error C2664: 'Get_GameObj' : cannot convert parameter 1 from 'const char *' to 'int' c:\Westwood\RenegadeFDS\Server\gmmain.cpp 3222


This account is no longer being active.
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: could anyone help me with this mod commands
Next Topic: [Release] split mine limit plug-in
Goto Forum:
  


Current Time: Tue Nov 26 02:59:46 MST 2024

Total time taken to generate the page: 0.00859 seconds