C++ error [message #363028] |
Sat, 13 December 2008 12:43 |
|
YazooGang
Messages: 742 Registered: August 2008 Location: US
Karma:
|
Colonel |
|
|
i wanted to make something quick for my renegade server and i made this simple command so in the future, it might be useful to like modify it and use it for something else:
class weaponmodChatCommand : public ChatCommandClass {
void Triggered(int ID,const TokenClass &Text,int ChatType) {
GameObject *obj = Get_GameObj(ID);
if (state == WeaponClass::Firing)
{
Commands->Give_Points(obj,10,false);
Commands->Give_Money(obj,10,false);
}
else
{
//nothing
}
}
};
ChatCommandRegistrant<weaponmodChatCommand> weaponmodChatCommandReg("!modw",CHATTYPE_ALL,0,GAMEMODE_AOW);
well, unfortunatly, i got errors:
Quote: | Error 1 error C2065: 'state' : undeclared identifier c:\Westwood\RenegadeFDS\Server\gmmain.cpp 1302
|
Quote: | Error 2 error C2597: illegal reference to non-static member 'WeaponClass::Firing' c:\Westwood\RenegadeFDS\Server\gmmain.cpp 1302
|
Quote: | Error 3 error C3867: 'WeaponClass::Firing': function call missing argument list; use '&WeaponClass::Firing' to create a pointer to member c:\Westwood\RenegadeFDS\Server\gmmain.cpp 1302
|
Quote: | Error 4 error C2568: '==' : unable to resolve function overload c:\Westwood\RenegadeFDS\Server\gmmain.cpp 1302
|
Quote: | Error 5 error BK1506 : cannot open file '.\tmp\scripts\debug\gmmain.sbr': No such file or directory BSCMAKE
|
help?
[Updated on: Sat, 13 December 2008 12:43] Report message to a moderator
|
|
|