Game Development Community

Errata Website anywhere?

by Joe Jansen · in Torque Game Engine · 04/20/2008 (7:23 am) · 7 replies

Does Ken Finney have a website where he shows the correction for all of the typos in the code, etc.? I have made it to chapter 4, and find that his directory structures are incorrect, files are missing, etc. I still haven't been able to get it to work. I get a black screen, and if I drag my mouse across it, I get a trail of red dots. In order to make sure it wasn't my typing causing trouble, I copied his code from the CD. This pointed to a mission file that was not in the correct place (no data folder in his dir. tree). He did not stub out function OnPhase3Progress(), the end of my console log shows:

*** Phase 3: Mission Lighting
Successfully loaded mission lighting file: 'control/data/maps/book_ch4_c1eb4cc2.ml'
Mission lighting done
Mapping string: MissionStartPhase3Ack to index: 2
Object 'MaleAvatar' is not a member of the 'GameBaseData' data block class
control/server.cs (58): Register object failed for object (null) of class Player.
control/server.cs (61): Unable to find object: '0' attempting to call function 'setTransform'


I have yet to find a beginner tutorial that: A. Works and B. shows what is the minimum to make a project run. All of them start out with a bunch of files in a directory structure, and don't tell you what those files are for. I tried the Super.Tag tutorial, but that doesn't run either.....

If anyone can point to a website the Finney has to shows how to make his programs actually work, I would appreciate it.

--Joe Jansen

#1
04/20/2008 (8:28 am)
I quit using the book because of the same problem. Not to mention It doesn't really help you learn how to apply many features to anything other than what he has supplied, i.e. doesn't go into detail on why and where, just more of an "add this text to this" kind of approach.

I've never seen a website for what you want, but as far as the minimum to make a project run, supposidly all you need to start a new project is a fresh main.cs in your folder. Know I was no help, but wanting you to know you're not alone.
#2
04/23/2008 (1:24 am)
The errata is on the CD, but it looks like you have a problem on line 58 of server.cs

EDIT: the fixed code seems to be on the CD of the 2nd edition, guess it might be different for the first.
#3
04/23/2008 (6:40 am)
You might have given up by now, but post your whole server.cs and I'll compare it with the second edition server.cs and tell you what to change it to.
#4
04/23/2008 (7:29 am)
Sorry, I didn't specify that I was using the 2nd edition of the book. Also, in this case, I have copied the code from the CD into the directory in an attempt to verify that I had not made a typo. For relevance, here is line 54 - 61 from that code....

// Create the player object
%player = new Player() {
dataBlock = MaleAvatar; // defined in player.cs
client = %this; // the avatar will have a pointer to its
}; // owner's connection

// Player setup...
%player.setTransform(%spawnPoint); // where to put it

Line 58 is the:

};

Thanks for the help.
#5
04/23/2008 (1:38 pm)
When you copied the file from the CD did you use the batch file to delete the previous .dos(s) cause i copied my files from the cd over and it worked perfectly for me. You might also want to check that line 58, if you're using torsion, links up with the { that appears right after %player = new Player(). but if you delete your .dso and use the cd copy of server.cs it should work.
#6
04/23/2008 (3:50 pm)
I am using SciTE currently for text editing, and it does verify that the proper { } line up.
I ran the full cleanup batch file, but I am still getting the same result. I suspect that the line stating that MaleAvatar is not a member of the GameBaseData data block class is probably the source of the trouble. Here is the datablock declaration for MaleAvatar:

datablock PlayerData(MaleAvatar)
{
renderFirstPerson = false;
emap = true;

className = Avatar;
shapeFile = "~/player.dts";
cameraMaxDist = 3;

mass = 100;
drag = 0.1;
maxdrag = 0.5;
density = 10;
maxDamage = 100;
maxEnergy = 100;

runForce = 50 * 90;
maxForwardSpeed = 15;
maxBackwardSpeed = 10;
maxSideSpeed = 12;

jumpForce = 10 * 90;

// Controls over slope of runnable/jumpable surfaces
runSurfaceAngle = 70;
jumpSurfaceAngle = 80;

minJumpSpeed = 20;
maxJumpSpeed = 30;


};

If I understand the book properly, MaleAvatar is declared as part of the PlayerData class, right?

Thanks for all the suggestions so far.

--Joe
#7
04/23/2008 (4:51 pm)
Use my profile and toss me an e-mail Joe, I'll send you my files, because I'm just unable to figure out what's going on with yours, i'm not the most proficient scripter. Mine works completely, no errors, then you can fish through and see which file was the culprit and see what was wrong.