Easy to Reproduce Lag Issue (FPS RTS hybrid)
by Vijay Myneni · in RTS Starter Kit · 11/28/2004 (9:39 pm) · 92 replies
Okay, this might not actually be an issue, but it's driving me crazy. Hopefully, someone can try this out and let me know if I'm just seeing things. It's fairly quick to set up and try. This post also doubles as a good set of instructions for the basics of getting the FPS player into your RTS game (I want to ultimately make this a resource combined with instructions for setting up clean switching between RTS and FPS control).
1. Start with a clean RTS Engine build, and a clean starter.RTS project. Also have a starter.fps directory around to grab files from.
2. Grab the server/scripts/player.cs file from starter.fps and copy it to server/scripts/avatars/fpsPlayer.cs in starter.RTS.
3. Grab the data/shapes/player directory from starter.fps and copy it to data/shapes/fpsPlayer in starter.RTS.
4. In server/scripts/avatars/fpsPlayer.cs, change the very first exec line to point to your new data directory:
6. Repeat step 5 in your server/scripts/core/game.cs file. My understanding is that the exec's should happen in the same order in both these files. I have mine happening right after player.cs gets exec'd. Also, I had to ultimately add a line for scripts/fx/environment.cs into my game.cs, so that it matched up with init.cs. If I don't do this, the game crashes during datablock transfer.
7. In server/scripts/core/gameConnection.cs, replace the existing onClientEnterGame with this:
8. Also in gameConnection.cs, add the following function:
Continued...
1. Start with a clean RTS Engine build, and a clean starter.RTS project. Also have a starter.fps directory around to grab files from.
2. Grab the server/scripts/player.cs file from starter.fps and copy it to server/scripts/avatars/fpsPlayer.cs in starter.RTS.
3. Grab the data/shapes/player directory from starter.fps and copy it to data/shapes/fpsPlayer in starter.RTS.
4. In server/scripts/avatars/fpsPlayer.cs, change the very first exec line to point to your new data directory:
exec("~/data/shapes/fpsPlayer/player.cs");5. In server/init.cs, add a line to exec your new fpsPlayer.cs script: exec("./scripts/avatars/fpsPlayer.cs");. 6. Repeat step 5 in your server/scripts/core/game.cs file. My understanding is that the exec's should happen in the same order in both these files. I have mine happening right after player.cs gets exec'd. Also, I had to ultimately add a line for scripts/fx/environment.cs into my game.cs, so that it matched up with init.cs. If I don't do this, the game crashes during datablock transfer.
7. In server/scripts/core/gameConnection.cs, replace the existing onClientEnterGame with this:
function GameConnection::onClientEnterGame(%this)
{
commandToClient(%this, 'SyncClock', $Sim::Time - $Game::StartTime);
%clientIndex = %this.getClientIndex();
%this.setTeam(%clientIndex);
%offset = ((%this.getTeam()-1) * (%unitsPerDir + 5));
// Create a new camera object.
%this.camera = new Camera() {
dataBlock = Observer;
};
MissionCleanup.add( %this.camera );
%this.camera.scopeToClient(%this);
// Setup game parameters, the onConnect method currently starts
// everyone with a 0 score.
%this.score = 0;
// Create a player object.
%this.createFPSPlayer((%offset*5) SPC (%offset*5) SPC "250");
}8. Also in gameConnection.cs, add the following function:
function GameConnection::createFPSPlayer(%this, %spawnPoint)
{
if (%this.player > 0) {
// The client should not have a player currently
// assigned. Assigning a new one could result in
// a player ghost.
error( "Attempting to create an angus ghost!" );
}
// Create the player object
%player = new Player() {
dataBlock = PlayerBody;
client = %this;
};
MissionCleanup.add(%player);
// Player setup...
%player.setTransform(%spawnPoint);
%player.setShapeName(%this.name);
// Starting equipment
%player.setInventory(Crossbow,1);
%player.setInventory(CrossbowAmmo,10);
%player.mountImage(CrossbowImage,0);
// Update the camera to start with the player
%this.camera.setTransform(%player.getEyeTransform());
// Give the client control of the player
%this.player = %player;
%this.setControlObject(%player);
}Continued...
About the author
#62
11/07/2005 (10:17 pm)
C:\Torque\SDK\engine\game\gameConnection.cc(1372) : error C2143: syntax error : missing ';' before '}'
#63
C:\Torque\SDK\engine\game\gameConnection.cc(1372) : error C2143: syntax error : missing ';' before '}'
C:\Torque\SDK\engine\game\gameConnection.cc(1372) : error C2143: syntax error : missing ';' before '}'
C:\Torque\SDK\engine\game\gameConnection.cc(1372) : error C2143: syntax error : missing ';' before '}'
C:\Torque\SDK\engine\game\gameConnection.cc(1372) : error C2143: syntax error : missing ';' before '}'
C:\Torque\SDK\engine\game\gameConnection.cc(1372) : error C2143: syntax error : missing ';' before '}'
C:\Torque\SDK\engine\game\gameConnection.cc(1372) : error C2143: syntax error : missing ';' before '}'
C:\Torque\SDK\engine\game\gameConnection.cc(1372) : error C2143: syntax error : missing ';' before '}'
C:\Torque\SDK\engine\game\gameConnection.cc(1372) : error C2143: syntax error : missing ';' before '}'
C:\Torque\SDK\engine\game\gameConnection.cc(1372) : error C2143: syntax error : missing ';' before '}'
C:\Torque\SDK\engine\game\gameConnection.cc(1372) : error C2143: syntax error : missing ';' before '}'
C:\Torque\SDK\engine\game\gameConnection.cc(1372) : error C2143: syntax error : missing ';' before '}'
C:\Torque\SDK\engine\game\gameConnection.cc(1372) : error C2143: syntax error : missing ';' before '}'
C:\Torque\SDK\engine\game\gameConnection.cc(1372) : error C2143: syntax error : missing ';' before '}'
C:\Torque\SDK\engine\game\gameConnection.cc(1372) : error C2143: syntax error : missing ';' before '}'
C:\Torque\SDK\engine\game\gameConnection.cc(1372) : error C2143: syntax error : missing ';' before '}'
C:\Torque\SDK\engine\game\gameConnection.cc(1372) : error C2143: syntax error : missing ';' before '}'
C:\Torque\SDK\engine\game\gameConnection.cc(1372) : error C2143: syntax error : missing ';' before '}'
C:\Torque\SDK\engine\game\gameConnection.cc(1372) : error C2143: syntax error : missing ';' before '}'
C:\Torque\SDK\engine\game\gameConnection.cc(1372) : error C2143: syntax error : missing ';' before '}'
C:\Torque\SDK\engine\game\gameConnection.cc(1372) : error C2143: syntax error : missing ';' before '}'
C:\Torque\SDK\engine\game\gameConnection.cc(1372) : error C2143: syntax error : missing ';' before '}'
C:\Torque\SDK\engine\game\gameConnection.cc(1372) : error C2143: syntax error : missing ';' before '}'
C:\Torque\SDK\engine\game\gameConnection.cc(1372) : error C2143: syntax error : missing ';' before '}'
C:\Torque\SDK\engine\game\gameConnection.cc(1372) : error C2143: syntax error : missing ';' before '}'
11/07/2005 (10:17 pm)
C:\Torque\SDK\engine\game\gameConnection.cc(1372) : error C2143: syntax error : missing ';' before '}'C:\Torque\SDK\engine\game\gameConnection.cc(1372) : error C2143: syntax error : missing ';' before '}'
C:\Torque\SDK\engine\game\gameConnection.cc(1372) : error C2143: syntax error : missing ';' before '}'
C:\Torque\SDK\engine\game\gameConnection.cc(1372) : error C2143: syntax error : missing ';' before '}'
C:\Torque\SDK\engine\game\gameConnection.cc(1372) : error C2143: syntax error : missing ';' before '}'
C:\Torque\SDK\engine\game\gameConnection.cc(1372) : error C2143: syntax error : missing ';' before '}'
C:\Torque\SDK\engine\game\gameConnection.cc(1372) : error C2143: syntax error : missing ';' before '}'
C:\Torque\SDK\engine\game\gameConnection.cc(1372) : error C2143: syntax error : missing ';' before '}'
C:\Torque\SDK\engine\game\gameConnection.cc(1372) : error C2143: syntax error : missing ';' before '}'
C:\Torque\SDK\engine\game\gameConnection.cc(1372) : error C2143: syntax error : missing ';' before '}'
C:\Torque\SDK\engine\game\gameConnection.cc(1372) : error C2143: syntax error : missing ';' before '}'
C:\Torque\SDK\engine\game\gameConnection.cc(1372) : error C2143: syntax error : missing ';' before '}'
C:\Torque\SDK\engine\game\gameConnection.cc(1372) : error C2143: syntax error : missing ';' before '}'
C:\Torque\SDK\engine\game\gameConnection.cc(1372) : error C2143: syntax error : missing ';' before '}'
C:\Torque\SDK\engine\game\gameConnection.cc(1372) : error C2143: syntax error : missing ';' before '}'
C:\Torque\SDK\engine\game\gameConnection.cc(1372) : error C2143: syntax error : missing ';' before '}'
C:\Torque\SDK\engine\game\gameConnection.cc(1372) : error C2143: syntax error : missing ';' before '}'
C:\Torque\SDK\engine\game\gameConnection.cc(1372) : error C2143: syntax error : missing ';' before '}'
C:\Torque\SDK\engine\game\gameConnection.cc(1372) : error C2143: syntax error : missing ';' before '}'
C:\Torque\SDK\engine\game\gameConnection.cc(1372) : error C2143: syntax error : missing ';' before '}'
C:\Torque\SDK\engine\game\gameConnection.cc(1372) : error C2143: syntax error : missing ';' before '}'
C:\Torque\SDK\engine\game\gameConnection.cc(1372) : error C2143: syntax error : missing ';' before '}'
C:\Torque\SDK\engine\game\gameConnection.cc(1372) : error C2143: syntax error : missing ';' before '}'
C:\Torque\SDK\engine\game\gameConnection.cc(1372) : error C2143: syntax error : missing ';' before '}'
C:\Torque\SDK\engine\game\gameConnection.cc(1372) : error C2143: syntax error : missing ';' before '}'
#64
11/07/2005 (10:19 pm)
C:\Torque\SDK\engine\game\gameConnection.cc(1372) : error C2143: syntax error : missing ';' before '}' C:\Torque\SDK\engine\game\gameConnection.cc(1372) : error C2143: syntax error : missing ';' before '}' C:\Torque\SDK\engine\game\gameConnection.cc(1372) : error C2143: syntax error : missing ';' before '}' C:\Torque\SDK\engine\game\gameConnection.cc(1372) : error C2143: syntax error : missing ';' before '}' C:\Torque\SDK\engine\game\gameConnection.cc(1372) : error C2143: syntax error : missing ';' before '}' C:\Torque\SDK\engine\game\gameConnection.cc(1372) : error C2143: syntax error : missing ';' before '}' C:\Torque\SDK\engine\game\gameConnection.cc(1372) : error C2143: syntax error : missing ';' before '}' C:\Torque\SDK\engine\game\gameConnection.cc(1372) : error C2143: syntax error : missing ';' before '}' C:\Torque\SDK\engine\game\gameConnection.cc(1372) : error C2143: syntax error : missing ';' before '}' C:\Torque\SDK\engine\game\gameConnection.cc(1372) : error C2143: syntax error : missing ';' before '}' C:\Torque\SDK\engine\game\gameConnection.cc(1372) : error C2143: syntax error : missing ';' before '}' C:\Torque\SDK\engine\game\gameConnection.cc(1372) : error C2143: syntax error : missing ';' before '}' C:\Torque\SDK\engine\game\gameConnection.cc(1372) : error C2143: syntax error : missing ';' before '}' C:\Torque\SDK\engine\game\gameConnection.cc(1372) : error C2143: syntax error : missing ';' before '}' C:\Torque\SDK\engine\game\gameConnection.cc(1372) : error C2143: syntax error : missing ';' before '}' C:\Torque\SDK\engine\game\gameConnection.cc(1372) : error C2143: syntax error : missing ';' before '}' C:\Torque\SDK\engine\game\gameConnection.cc(1372) : error C2143: syntax error : missing ';' before '}' C:\Torque\SDK\engine\game\gameConnection.cc(1372) : error C2143: syntax error : missing ';' before '}' C:\Torque\SDK\engine\game\gameConnection.cc(1372) : error C2143: syntax error : missing ';' before '}' C:\Torque\SDK\engine\game\gameConnection.cc(1372) : error C2143: syntax error : missing ';' before '}' C:\Torque\SDK\engine\game\gameConnection.cc(1372) : error C2143: syntax error : missing ';' before '}' C:\Torque\SDK\engine\game\gameConnection.cc(1372) : error C2143: syntax error : missing ';' before '}' C:\Torque\SDK\engine\game\gameConnection.cc(1372) : error C2143: syntax error : missing ';' before '}' C:\Torque\SDK\engine\game\gameConnection.cc(1372) : error C2143: syntax error : missing ';' before '}' C:\Torque\SDK\engine\game\gameConnection.cc(1372) : error C2143: syntax error : missing ';' before '}'
#65
11/07/2005 (10:19 pm)
C:\Torque\SDK\engine\game\gameConnection.cc(1372) : error C2143: syntax error : missing ';' before '}'
C:\Torque\SDK\engine\game\gameConnection.cc(1372) : error C2143: syntax error : missing ';' before '}'
C:\Torque\SDK\engine\game\gameConnection.cc(1372) : error C2143: syntax error : missing ';' before '}'
C:\Torque\SDK\engine\game\gameConnection.cc(1372) : fatal error C1003: error count exceeds 100; stopping compilation
gameConnectionEvents.cc
../engine\game/gameConnection.h(247) : error C2535: 'bool __thiscall GameConnection::onAdd(void)' : member function already defined or declared
../engine\game/gameConnection.h(231) : see declaration of 'onAdd'
../engine\game/gameConnection.h(248) : error C2535: 'void __thiscall GameConnection::onRemove(void)' : member function already defined or declared
../engine\game/gameConnection.h(240) : see declaration of 'onRemove'
gameConnectionMoves.cc
../engine\game/gameConnection.h(247) : error C2535: 'bool __thiscall GameConnection::onAdd(void)' : member function already defined or declared
../engine\game/gameConnection.h(231) : see declaration of 'onAdd'
../engine\game/gameConnection.h(248) : error C2535: 'void __thiscall GameConnection::onRemove(void)' : member function already defined or declared
../engine\game/gameConnection.h(240) : see declaration of 'onRemove'
gameProcess.cc
../engine\game/gameConnection.h(247) : error C2535: 'bool __thiscall GameConnection::onAdd(void)' : member function already defined or declared
../engine\game/gameConnection.h(231) : see declaration of 'onAdd'
../engine\game/gameConnection.h(248) : error C2535: 'void __thiscall GameConnection::onRemove(void)' : member function already defined or declared
../engine\game/gameConnection.h(240) : see declaration of 'onRemove'
gameTSCtrl.cc
../engine\game/gameConnection.h(247) : error C2535: 'bool __thiscall GameConnection::onAdd(void)' : member function already defined or declared
../engine\game/gameConnection.h(231) : see declaration of 'onAdd'
../engine\game/gameConnection.h(248) : error C2535: 'void __thiscall GameConnection::onRemove(void)' : member function already defined or declared
../engine\game/gameConnection.h(240) : see declaration of 'onRemove'
#66
11/07/2005 (10:20 pm)
pathCamera.cc
../engine\game/gameConnection.h(247) : error C2535: 'bool __thiscall GameConnection::onAdd(void)' : member function already defined or declared
../engine\game/gameConnection.h(231) : see declaration of 'onAdd'
../engine\game/gameConnection.h(248) : error C2535: 'void __thiscall GameConnection::onRemove(void)' : member function already defined or declared
../engine\game/gameConnection.h(240) : see declaration of 'onRemove'
player.cc
../engine\game/gameConnection.h(247) : error C2535: 'bool __thiscall GameConnection::onAdd(void)' : member function already defined or declared
../engine\game/gameConnection.h(231) : see declaration of 'onAdd'
../engine\game/gameConnection.h(248) : error C2535: 'void __thiscall GameConnection::onRemove(void)' : member function already defined or declared
../engine\game/gameConnection.h(240) : see declaration of 'onRemove'
scopeAlwaysShape.cc
../engine\game/gameConnection.h(247) : error C2535: 'bool __thiscall GameConnection::onAdd(void)' : member function already defined or declared
../engine\game/gameConnection.h(231) : see declaration of 'onAdd'
../engine\game/gameConnection.h(248) : error C2535: 'void __thiscall GameConnection::onRemove(void)' : member function already defined or declared
../engine\game/gameConnection.h(240) : see declaration of 'onRemove'
shapeBase.cc
../engine\game/gameConnection.h(247) : error C2535: 'bool __thiscall GameConnection::onAdd(void)' : member function already defined or declared
../engine\game/gameConnection.h(231) : see declaration of 'onAdd'
../engine\game/gameConnection.h(248) : error C2535: 'void __thiscall GameConnection::onRemove(void)' : member function already defined or declared
../engine\game/gameConnection.h(240) : see declaration of 'onRemove'
shapeImage.cc
../engine\game/gameConnection.h(247) : error C2535: 'bool __thiscall GameConnection::onAdd(void)' : member function already defined or declared
../engine\game/gameConnection.h(231) : see declaration of 'onAdd'
../engine\game/gameConnection.h(248) : error C2535: 'void __thiscall GameConnection::onRemove(void)' : member function already defined or declared
../engine\game/gameConnection.h(240) : see declaration of 'onRemove'
sceneLighting.cc
../engine\game/gameConnection.h(247) : error C2535: 'bool __thiscall GameConnection::onAdd(void)' : member function already defined or declared
../engine\game/gameConnection.h(231) : see declaration of 'onAdd'
../engine\game/gameConnection.h(248) : error C2535: 'void __thiscall GameConnection::onRemove(void)' : member function already defined or declared
../engine\game/gameConnection.h(240) : see declaration of 'onRemove'
audio.cc
../engine\game/gameConnection.h(247) : error C2535: 'bool __thiscall GameConnection::onAdd(void)' : member function already defined or declared
../engine\game/gameConnection.h(231) : see declaration of 'onAdd'
../engine\game/gameConnection.h(248) : error C2535: 'void __thiscall GameConnection::onRemove(void)' : member function already defined or declared
../engine\game/gameConnection.h(240) : see declaration of 'onRemove'
Error executing cl.exe.
#67
11/07/2005 (10:20 pm)
Wow 186 errors i think i set a new record :-)
#68
11/08/2005 (10:04 am)
Basically you dident follow the steps properly. I cant tell what the exact problem is. If you like you can send me your gameconnection.cc file and I will correct it.
#69
11/08/2005 (2:04 pm)
Okay I will try to correct it myself so that I can learn. I'll also send you a copy of the gameconnection.cc file. Thanks so much for your help
#70
Function blah(){
Function blah2(){
}
}
This quite obviously is not allowed in C++. A quick suggestion for a successful project would be to pick up a beginning Cpp book and work through it to get a good solid programming base before jumping in over your head.
The reason it is complaining about the semi-colon is either what I spoke of above, or because you simply forgot to close a line. All commands in C++ are closed with a Semi-Colon, because white space is ignored by default. You also need to be careful about copying and pasting out of these code windows, because some single line comments could get line-wrapped down on to a second line and give your compiler a heart attack. Look for something like this:
//This is a comment that went
way wrong
It should read //This is a comment that went way wrong
If formatted properly comments are ignored by the compiler and treated as if it doesnt exist. However the // command only comments out what is on the same physical line. To do what are called "block comments" (to comment out entire sections, over multiple lines) use the command /* Comment Text */
Hope this helps, best of luck with your debugging, and your project.
11/17/2005 (12:00 pm)
Check both your opening and closing brackets. Chances are you tried to define a class or function within the closing brackets of another class or function (like the following)Function blah(){
Function blah2(){
}
}
This quite obviously is not allowed in C++. A quick suggestion for a successful project would be to pick up a beginning Cpp book and work through it to get a good solid programming base before jumping in over your head.
The reason it is complaining about the semi-colon is either what I spoke of above, or because you simply forgot to close a line. All commands in C++ are closed with a Semi-Colon, because white space is ignored by default. You also need to be careful about copying and pasting out of these code windows, because some single line comments could get line-wrapped down on to a second line and give your compiler a heart attack. Look for something like this:
//This is a comment that went
way wrong
It should read //This is a comment that went way wrong
If formatted properly comments are ignored by the compiler and treated as if it doesnt exist. However the // command only comments out what is on the same physical line. To do what are called "block comments" (to comment out entire sections, over multiple lines) use the command /* Comment Text */
Hope this helps, best of luck with your debugging, and your project.
#71
Since i didn't copy and paste it i'm sure the brackets got away frome me. I will type it in when i have the time.
11/17/2005 (1:23 pm)
Thanks when I debug I think I'll actually learn more than copy-paste :-) but yes I'm aware of the semicolon rule. Since i didn't copy and paste it i'm sure the brackets got away frome me. I will type it in when i have the time.
#72
editor.cc
../engine\game/gameConnection.h(247) : error C2535: 'bool __thiscall GameConnection::onAdd(void)' : member function already defined or declared
../engine\game/gameConnection.h(231) : see declaration of 'onAdd'
../engine\game/gameConnection.h(248) : error C2535: 'void __thiscall GameConnection::onRemove(void)' : member function already defined or declared
../engine\game/gameConnection.h(240) : see declaration of 'onRemove'
I get about 90 or so of these messages. But the problem is they're not in the this file... i think
11/20/2005 (3:57 pm)
Okay I found the missing semi colon but now I get an error about gameconnection::onadd being there:editor.cc
../engine\game/gameConnection.h(247) : error C2535: 'bool __thiscall GameConnection::onAdd(void)' : member function already defined or declared
../engine\game/gameConnection.h(231) : see declaration of 'onAdd'
../engine\game/gameConnection.h(248) : error C2535: 'void __thiscall GameConnection::onRemove(void)' : member function already defined or declared
../engine\game/gameConnection.h(240) : see declaration of 'onRemove'
I get about 90 or so of these messages. But the problem is they're not in the this file... i think
#73
To fix I'll qoute my self
"comment out the
GameConnection::onAdd() and onRemove() functions in gameconnection.cc"
Then in the .h file.
"then after void setDataBlockSequence(U32 seq) { mDataBlockSequence = seq; }
11/20/2005 (6:55 pm)
It most likely means you have onAdd in both GameConnection.cc and .h.To fix I'll qoute my self
"comment out the
GameConnection::onAdd() and onRemove() functions in gameconnection.cc"
Then in the .h file.
"then after void setDataBlockSequence(U32 seq) { mDataBlockSequence = seq; }
bool onAdd()
{
if(!Parent::onAdd())
return false;
SimSet *s = new SimSet();
s->registerObject();
mVisibleUnits = s;
return true;
}
void onRemove()
{
Parent::onRemove();
if(!mVisibleUnits.isNull())
mVisibleUnits->deleteObject();
}"
#74
Anyway I'm getting an error that says well:
Like that
I took the code directly from this forum
The C++ book i picked up says that destructors handle closing the program. In which file would the error be?
11/20/2005 (9:56 pm)
18 errors What What! I think I'm learning more trying to debug this thing than i did by reading through the code.Anyway I'm getting an error that says well:
C:\Torque\SDK\engine\game\gameConnection.cc(133) : error C2523: 'RtsUnitMoveEvent::~RTSUnitMoveEvent' : destructor tag mismatch
Like that
I took the code directly from this forum
The C++ book i picked up says that destructors handle closing the program. In which file would the error be?
#75
Anyway I'm getting an error that says well:
Like that
I took the code directly from this forum
The C++ book i picked up says that destructors handle closing the program. In which file would the error be?
11/20/2005 (10:58 pm)
18 errors What What! I think I'm learning more trying to debug this thing than i did by reading through the code.Anyway I'm getting an error that says well:
C:\Torque\SDK\engine\game\gameConnection.cc(133) : error C2523: 'RtsUnitMoveEvent::~RTSUnitMoveEvent' : destructor tag mismatch
Like that
I took the code directly from this forum
The C++ book i picked up says that destructors handle closing the program. In which file would the error be?
#76
[mini-soapbox]
"Find in Files" is one of the most useful tools around for learning Torque. I've been working with Torque for more than a year and a half now, and I use it for just about everything I do.
[/mini-soapbox]
11/21/2005 (5:52 am)
Does your file editing tool have a "Search/Find in Files" option? You could easily search for "RTSUnitMoveEvent::~RTSUnitMoveEvent" and find exactly where it is located.[mini-soapbox]
"Find in Files" is one of the most useful tools around for learning Torque. I've been working with Torque for more than a year and a half now, and I use it for just about everything I do.
[/mini-soapbox]
#77
However for that specific error:
'RtsUnitMoveEvent::~RTSUnitMoveEvent' : destructor tag mismatch'
It should be very obvious for you. The Destructor of class has the same name as the class itself, with the addition of a Tilde.
RtsUnitMoveEvent is not the same as RTSUnitMoveEvent.
Check your cases.
11/22/2005 (5:53 pm)
Beyond that, for many errors, double clicking will take you directly to the applicable line.However for that specific error:
'RtsUnitMoveEvent::~RTSUnitMoveEvent' : destructor tag mismatch'
It should be very obvious for you. The Destructor of class has the same name as the class itself, with the addition of a Tilde.
RtsUnitMoveEvent is not the same as RTSUnitMoveEvent.
Check your cases.
#78
Should I look at the rtsunit.cc file to find the destructor?
Are the destructors usually in the same code file or can they be in different files
11/22/2005 (7:46 pm)
But wouldn't the tilde make it different? I'm sorry I'm just not getting this.Should I look at the rtsunit.cc file to find the destructor?
Are the destructors usually in the same code file or can they be in different files
#79
11/22/2005 (7:48 pm)
Also: What do errors like this mean and how can I resolve them?C:\Torque\SDK\engine\game\gameConnection.cc(146) : error C2001: newline in constant C:\Torque\SDK\engine\game\gameConnection.cc(147) : error C2001: newline in constant
#80
what's a ctor?
11/22/2005 (7:55 pm)
Also I get a line warning that says C:\Torque\SDK\engine\game\gameConnection.cc(131) : warning C4183: 'RTSUnitMoveEvent': member function definition looks like a ctor, but name does not match enclosing class
what's a ctor?
Torque Owner Marvin Hawkins
class RTSUnitMoveEvent : public NetEvent
was one of them.
In fact it highlighted a bunch of them.