Renegade Public Forums
C&C: Renegade --> Dying since 2003™, resurrected in 2024!
Home » Renegade Discussions » Mod Forum » !spec script release  () 5 Votes
Re: !spec script release [message #334799 is a reply to message #330771] Wed, 11 June 2008 21:49 Go to previous messageGo to previous message
HeavyX101- Left is currently offline  HeavyX101- Left
Messages: 633
Registered: April 2008
Location: WindowsJail=ZipFolder
Karma:
Colonel
Guys, sorry that i'm posting on this old thread, but i need help.
This is what i did.

spect.h
class Player_Spectate : public ScriptImpClass {
public:
void Created(GameObject *obj);
};



spect.cpp
#include "scripts.h"
#include "engine.h"
#include "spect.h"

void Player_Spectate::Created(GameObject *obj) {
Commands->Set_Is_Visible(obj,false);
Commands->Set_Model(obj,"null");
Commands->Set_Shield_Type(obj,"Blamo");
Commands->Clear_Weapons(obj);
Toggle_Fly_Mode(obj);
Commands->Disable_All_Collisions(obj);
}
ScriptRegistrant<Player_Spectate> Player_Spectate_Registrant("Player_Spectate","");




added on gmmain.cpp
class spectateChatCommand : public ChatCommandClass {
void Triggered(int ID,const TokenClass &Text,int ChatType) {
GameObject *obj = Get_GameObj(ID);
if (Is_Script_Attached(obj,"Player_Spectate")) {
Commands->Destroy_Object(obj);
}
else {
Commands->Attach_Script(obj,"Player_Spectate","");
}
}
}
};
ChatCommandRegistrant<spectateChatCommand> spectateChatCommandReg("!spec",CHATTYPE_ALL,0,GAMEMODE_AOW);


I modified the code so there could not be the permission thing.
The problem is that i get alot of errors that i dont understand.
Here are the errors:
Quote:

.\gmmain.cpp(1345) : error C2143: syntax error : missing ';' before '}'
.\gmmain.cpp(1335) : error C2059: syntax error : '}'
.\gmmain.cpp(1335) : error C2143: syntax error : missing ';' before '}'
.\gmmain.cpp(1335) : error C2059: syntax error : '}'
.\gmmain.cpp(1337) : error C2059: syntax error : 'if'
.\gmmain.cpp(1337) : error C2143: syntax error : missing ';' before '{'
.\gmmain.cpp(1337) : error C2447: '{' : missing function header (old-style formal list?)
.\gmmain.cpp(1340) : error C2059: syntax error : 'else'
.\gmmain.cpp(1340) : error C2143: syntax error : missing ';' before '{'
.\gmmain.cpp(1340) : error C2447: '{' : missing function header (old-style formal list?)
.\gmmain.cpp(1343) : error C2059: syntax error : '}'
.\gmmain.cpp(1343) : error C2143: syntax error : missing ';' before '}'
.\gmmain.cpp(1343) : error C2059: syntax error : '}'

Can anybody help?


This account is no longer being active.

[Updated on: Wed, 11 June 2008 21:49]

Report message to a moderator

 
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
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
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: C++. Need help.
Next Topic: Scripts
Goto Forum:
  


Current Time: Fri Dec 27 01:01:02 MST 2024

Total time taken to generate the page: 0.01135 seconds