Ch5 "maleavatar" object not part of base
by Anthony C · in Torque Game Engine · 05/15/2007 (8:39 am) · 0 replies
Mission lighting done
Mapping string: MissionStartPhase3Ack to index: 2
Object 'MaleAvatar' is not a member of the 'GameBaseData' data block class
control/server/server.cs (60): Register object failed for object (null) of class Player.
control/server/server.cs (61): Unable to find object: '0' attempting to call function 'setTransform'
control/server/server.cs (63): Unable to find object: '0' attempting to call function 'getEyeTransform'
control/server/server.cs (64): Unable to find object: '0' attempting to call function 'setEnergyLevel
this is what im getting in the log, ive checked the syntax, even checked other cs modules, not exactly
here is the section of the code being the culprit
function GameConnection::CreatePlayer(%this, %spawnPoint)
{
if(%this.player > 0)
{
Error(" attempting to create an angus ghost!");
}
//create the player object
%player = new Player() {
datablock = MaleAvatar;
client = %this;
};
%player.SetTransform(%spawnPoint);
//update the camera to start with the player
%this.camera.setTransform(%player.GetEyeTransform());
%player.SetEnergyLevel(100);
//give the client control of the player
%this.player = %player;
%this.SetControlObject(%player);
}
Now, as i said, i checked, server.cs and player.cs to see if i mistyped anything in particular, couldn't find any typos or syntax errors
I *did* however try making the functions lower case, from SetTransform to setTransform, i figured maybe the log was giving me the correct spelling of it, however i was wrong. I know this is simple compared to a lot of stuff, but i could use some help here please :)
-tonyC
Mapping string: MissionStartPhase3Ack to index: 2
Object 'MaleAvatar' is not a member of the 'GameBaseData' data block class
control/server/server.cs (60): Register object failed for object (null) of class Player.
control/server/server.cs (61): Unable to find object: '0' attempting to call function 'setTransform'
control/server/server.cs (63): Unable to find object: '0' attempting to call function 'getEyeTransform'
control/server/server.cs (64): Unable to find object: '0' attempting to call function 'setEnergyLevel
this is what im getting in the log, ive checked the syntax, even checked other cs modules, not exactly
here is the section of the code being the culprit
function GameConnection::CreatePlayer(%this, %spawnPoint)
{
if(%this.player > 0)
{
Error(" attempting to create an angus ghost!");
}
//create the player object
%player = new Player() {
datablock = MaleAvatar;
client = %this;
};
%player.SetTransform(%spawnPoint);
//update the camera to start with the player
%this.camera.setTransform(%player.GetEyeTransform());
%player.SetEnergyLevel(100);
//give the client control of the player
%this.player = %player;
%this.SetControlObject(%player);
}
Now, as i said, i checked, server.cs and player.cs to see if i mistyped anything in particular, couldn't find any typos or syntax errors
I *did* however try making the functions lower case, from SetTransform to setTransform, i figured maybe the log was giving me the correct spelling of it, however i was wrong. I know this is simple compared to a lot of stuff, but i could use some help here please :)
-tonyC
About the author