Game Development Community

Corrected Chapter 4 problems on CD files

by jnbutler1815 · in Torque Game Engine · 08/04/2005 (9:32 am) · 4 replies

First of all, I did not type the code from the book I ran the EmagaCh4KitInstall.exe file to install the needed directories and files. Then I copied all directories and files for ch4 from the CD to my C:\Emaga4 directory that the installer did not add. These would be the ones you type in from the book. Sue me, I'm lazy.

When I double-clicked on the tge.exe file the game started and my avatar was dropped into the game and I was able to move around and all that. Then just for grins, I examined the console.log file to see if there were any other problems. WOW! Just for the few seconds I was in the game the log file grew to over 1MB. I looked in the file and there was an endlesss repeating error about two functions. onMissionDownloadPhase3, and onPhase3Progress. It stated that it could not find the functions. So I looked to see where the onMissionDownloadPhase1 and 2 were being called from since they didn't give errors. In the c:\Emaga4\control\client.cs file there are stub functions for onMissionDownloadPhase1 and 2 and the onPhase1 and 2 progress functions but not for the two giving the errors. Go figure. I inserted the following stubs into the control\client.cs file and no more endless errors making the console.log file grow out of control.

Here are the stubs to add to the control\client.cs file.

function onMissionDownloadPhase3()
{
}
function onPhase3Progress()
{
}

There were no other errors being reported in the console.log file for emaga4 demo.
Let this be a lesson to newbies! When you are having problems, logically tract down what is going on in the code and nine times out of ten you can fix it or figure what you did wrong.

Enjoy chapter 4.

About the author

Programmer for 25 years, game enthusiast for most of my life. Love learning new things. Principal at JNButler Development.


#1
08/04/2005 (10:05 am)
Nice job, thanks for the play-by-play. I'll keep that in mind while I work my way through the book.
#2
08/06/2005 (10:00 am)
I'm doing chapter 5 now and the stubs I mentioned in my last post are also not in the client.cs file that the book has you type. Be aware and add these stubs or your console.log will grow out of control. I will post other problems as I encounter them.
#3
08/13/2005 (1:20 am)
Do any of you guys use Ultra Edit Studio? I have a problem with it: when I use tabs before a variable TGE does not recognize it. I think changeing all the tabs to spaces work. I was just trying out chapter 4 and I wrote out all of the code just to find out that it didn't run. I did check for typing errors, it was not that it. BTW what text editors/IDE are you guys using?
#4
08/13/2005 (2:57 pm)
Cristian- I use Ultra Edit pro that I downloaded and purchased from their website. You should not have any problems with whitespace, spaces, and tabs. I have not had that problem and never heard of anyone else with that problem. Must be something else. Did you check the console.log file to see exactly what errors you got, if any? Then go from there. Sorry I wasn't more help.