4.0 doesn't support some stuff that 3.4 did?? [message #468141] |
Tue, 29 May 2012 01:51 |
|
Distrbd21
Messages: 743 Registered: September 2008
Karma: 0
|
Colonel |
|
|
ChatCommandClass
ChatCommandRegistrant
TokenClass
It doesn't let me use them.
Here's the code I did.
class picChatCommand : public ChatCommandClass {
void Triggered(int ID,const TokenClass &Text,int ChatType) {
GameObject *obj = Get_GameObj(ID);
int cost = 1200;
const char *item = "Pic";
const char *powerup = "POW_PersonalIonCannon_Player";
// const char *wepname = "Weapon_PersonalIonCannon_Player";
if (Commands->Get_Money(Get_GameObj(ID)) < cost)
{
Console_Input(StrFormat("sndp %d m00evag_dsgn0028i1evag_snd.wav",ID).c_str());
Console_Input(StrFormat("ppage %d you need %d to buy a %s",ID, cost, item).c_str());
}
else
{
Commands->Give_PowerUp(obj, powerup, 1);
// Set_Clip_Bullets(obj,wepname,Get_Max_Clip_Bullets(obj,wepname));
Commands->Give_Money(obj, static_cast<float>(-cost), false);
Console_Input(StrFormat("msg %s just bought a %s ",Get_Player_Name(obj), item, cost).c_str());
}
}
};
ChatCommandRegistrant<picChatCommand> picChatCommandReg("!personal_ion_cannon;!pic",CHATTYPE_ALL,0,GAMEMODE_ALL);
Live Your Life Not Some one Else's.| Sharing Is Caring
Cookie Jar<glome> Who stole the cookie from the cookie jar?!
<content> glome stole the cookie from the cookie jar!
<glome> Who me?!
<content> Yes you!
<glome> Couldn't be!
<content> Then WHO?!!
<glome> Woody stole the cookie from the cookie jar!
*** glome has been kicked by DrWoody (fuck you i didn't touch the motherfucking cookie, bitch
Suicide<TB> I was depressed last night so I called the Suicide Life Line.
<TB> I reached a call center in Pakistan.
<TB> I told them I was suicidal.
<TB> They got all excited and asked if I could drive a truck
[Updated on: Tue, 29 May 2012 01:55] Report message to a moderator
|
|
|
|
|
Re: 4.0 doesn't support some stuff that 3.4 did?? [message #468178 is a reply to message #468141] |
Tue, 29 May 2012 20:30 |
|
Distrbd21
Messages: 743 Registered: September 2008
Karma: 0
|
Colonel |
|
|
I would love to yes
Live Your Life Not Some one Else's.| Sharing Is Caring
Cookie Jar<glome> Who stole the cookie from the cookie jar?!
<content> glome stole the cookie from the cookie jar!
<glome> Who me?!
<content> Yes you!
<glome> Couldn't be!
<content> Then WHO?!!
<glome> Woody stole the cookie from the cookie jar!
*** glome has been kicked by DrWoody (fuck you i didn't touch the motherfucking cookie, bitch
Suicide<TB> I was depressed last night so I called the Suicide Life Line.
<TB> I reached a call center in Pakistan.
<TB> I told them I was suicidal.
<TB> They got all excited and asked if I could drive a truck
|
|
|
|
Re: 4.0 doesn't support some stuff that 3.4 did?? [message #468210 is a reply to message #468190] |
Wed, 30 May 2012 13:54 |
|
Distrbd21
Messages: 743 Registered: September 2008
Karma: 0
|
Colonel |
|
|
robbyke wrote on Wed, 30 May 2012 05:22 | Current tokenclass? is it int the scripts already or is it comming?
|
apparently it's coming ;p
Live Your Life Not Some one Else's.| Sharing Is Caring
Cookie Jar<glome> Who stole the cookie from the cookie jar?!
<content> glome stole the cookie from the cookie jar!
<glome> Who me?!
<content> Yes you!
<glome> Couldn't be!
<content> Then WHO?!!
<glome> Woody stole the cookie from the cookie jar!
*** glome has been kicked by DrWoody (fuck you i didn't touch the motherfucking cookie, bitch
Suicide<TB> I was depressed last night so I called the Suicide Life Line.
<TB> I reached a call center in Pakistan.
<TB> I told them I was suicidal.
<TB> They got all excited and asked if I could drive a truck
|
|
|
Re: 4.0 doesn't support some stuff that 3.4 did?? [message #468213 is a reply to message #468141] |
Wed, 30 May 2012 14:32 |
|
Distrbd21
Messages: 743 Registered: September 2008
Karma: 0
|
Colonel |
|
|
It only give's me one error now.
Says something about !railgun;!rail
no instance of constructor "ChatCommandRegistrant<T>::ChatCommandRegistrant [with T=railgun1ChatCommand]" matches the argument list c:\users\distrbd21\documents\visual studio 2010\projects\source\weapons\weapons.cpp 41
class railgun1ChatCommand : public ChatCommandClass {
void Triggered(int ID,const TokenClass &Text,int ChatType) {
GameObject *obj = Get_GameObj(ID);
int cost = 1200;
const char *powerup = "POW_Railgun_Player";
if (Commands->Get_Money(Get_GameObj(ID)) < cost)
{
Commands->Give_PowerUp(obj, powerup, 1);
Commands->Give_Money(obj, static_cast<float>(-cost), false);
}
}
};
ChatCommandRegistrant<railgun1ChatCommand> railgun1ChatCommandReg("!railgun;!rail",0);
Live Your Life Not Some one Else's.| Sharing Is Caring
Cookie Jar<glome> Who stole the cookie from the cookie jar?!
<content> glome stole the cookie from the cookie jar!
<glome> Who me?!
<content> Yes you!
<glome> Couldn't be!
<content> Then WHO?!!
<glome> Woody stole the cookie from the cookie jar!
*** glome has been kicked by DrWoody (fuck you i didn't touch the motherfucking cookie, bitch
Suicide<TB> I was depressed last night so I called the Suicide Life Line.
<TB> I reached a call center in Pakistan.
<TB> I told them I was suicidal.
<TB> They got all excited and asked if I could drive a truck
|
|
|
Re: 4.0 doesn't support some stuff that 3.4 did?? [message #468221 is a reply to message #468141] |
Wed, 30 May 2012 16:42 |
robbyke
Messages: 348 Registered: September 2010 Location: Belgium
Karma: 0
|
Recruit |
|
|
fix the registrant :
template <class T> class ChatCommandRegistrant : public ChatCommandList {
public:
ChatCommandRegistrant(const char *Command,int NumParams) {
char *Comm = newstr(Command);
char *p = strtok(Comm,";");
while (p) {
ChatCommandClass *Temp = new T;
Add_Chat_Command(Temp,p,NumParams);
p = strtok(0,";");
}
delete[] Comm;
}
};
could be this fixes your problem, could be it doesnt i dont know where things go wrong in your code if i dont see it
Also your plugin will compile but wont work as you placed your commandclass in ssgm instead of your plugin
You have to place them inside your own plugin otherwise it wont work
Owner of kambot TT server
kambot.freeforums.org
[Updated on: Wed, 30 May 2012 16:45] Report message to a moderator
|
|
|
Re: 4.0 doesn't support some stuff that 3.4 did?? [message #468223 is a reply to message #468221] |
Wed, 30 May 2012 17:31 |
|
Distrbd21
Messages: 743 Registered: September 2008
Karma: 0
|
Colonel |
|
|
robbyke wrote on Wed, 30 May 2012 18:42 | fix the registrant :
template <class T> class ChatCommandRegistrant : public ChatCommandList {
public:
ChatCommandRegistrant(const char *Command,int NumParams) {
char *Comm = newstr(Command);
char *p = strtok(Comm,";");
while (p) {
ChatCommandClass *Temp = new T;
Add_Chat_Command(Temp,p,NumParams);
p = strtok(0,";");
}
delete[] Comm;
}
};
could be this fixes your problem, could be it doesnt i dont know where things go wrong in your code if i dont see it
Also your plugin will compile but wont work as you placed your commandclass in ssgm instead of your plugin
You have to place them inside your own plugin otherwise it wont work
|
I did place it in my own plugin after talking to you, I get no other error's but that one.
and I get this error now.
c:\users\distrbd21\documents\visual studio 2010\projects\source\weapons\WeapChatClass.h(37): error C2504: 'ChatCommandList' : base class undefined
2> Weapons.cpp(41) : see reference to class template instantiation 'ChatCommandRegistrant<T>' being compiled
2> with
2> [
2> T=railgun1ChatCommand
2> ]
Live Your Life Not Some one Else's.| Sharing Is Caring
Cookie Jar<glome> Who stole the cookie from the cookie jar?!
<content> glome stole the cookie from the cookie jar!
<glome> Who me?!
<content> Yes you!
<glome> Couldn't be!
<content> Then WHO?!!
<glome> Woody stole the cookie from the cookie jar!
*** glome has been kicked by DrWoody (fuck you i didn't touch the motherfucking cookie, bitch
Suicide<TB> I was depressed last night so I called the Suicide Life Line.
<TB> I reached a call center in Pakistan.
<TB> I told them I was suicidal.
<TB> They got all excited and asked if I could drive a truck
[Updated on: Wed, 30 May 2012 17:35] Report message to a moderator
|
|
|
|
Re: 4.0 doesn't support some stuff that 3.4 did?? [message #468232 is a reply to message #468224] |
Thu, 31 May 2012 01:31 |
|
Distrbd21
Messages: 743 Registered: September 2008
Karma: 0
|
Colonel |
|
|
robbyke wrote on Wed, 30 May 2012 20:04 | you sure everything is included everywhere?
also could you post the errors in the error window not the output window?
|
Error 3 error C2504: 'ChatCommandList' : base class undefined c:\users\distrbd21\documents\visual studio 2010\projects\source\weapons\WeapChatClass.h 37
Live Your Life Not Some one Else's.| Sharing Is Caring
Cookie Jar<glome> Who stole the cookie from the cookie jar?!
<content> glome stole the cookie from the cookie jar!
<glome> Who me?!
<content> Yes you!
<glome> Couldn't be!
<content> Then WHO?!!
<glome> Woody stole the cookie from the cookie jar!
*** glome has been kicked by DrWoody (fuck you i didn't touch the motherfucking cookie, bitch
Suicide<TB> I was depressed last night so I called the Suicide Life Line.
<TB> I reached a call center in Pakistan.
<TB> I told them I was suicidal.
<TB> They got all excited and asked if I could drive a truck
|
|
|