Problem with package_test.cs in The Essential Guide...
by Darrel Cusey · in Torque Game Engine · 12/16/2005 (7:58 am) · 2 replies
I installed the TGE 1.4 and have been reading this documentation, and running the sample code in the console as I go along.
Everything is fine until I get to the package_test.cs in "The Torquescript Language" chapter (about page 25 when I printed it).
I exec the script and do not receive compile errors. However, when I execute the command test_packages(0); I get this error:
(0): Unable to find function test_packages
Here's just the first few lines of the code I entered for package_test.cs -- I copied the code directly from The Essential Guide doc.
The full code is larger than the 4096 max character length for posting, so I'm just posting the first few lines of it, so people know which one I'm talking about:
//
// Define an initial function: demo()
//
function demo()
{
echo("Demo definition 0");
}
//
// Now define three packages, each implementing
// a new instance of: demo()
//
//
Everything is fine until I get to the package_test.cs in "The Torquescript Language" chapter (about page 25 when I printed it).
I exec the script and do not receive compile errors. However, when I execute the command test_packages(0); I get this error:
(0): Unable to find function test_packages
Here's just the first few lines of the code I entered for package_test.cs -- I copied the code directly from The Essential Guide doc.
The full code is larger than the 4096 max character length for posting, so I'm just posting the first few lines of it, so people know which one I'm talking about:
//
// Define an initial function: demo()
//
function demo()
{
echo("Demo definition 0");
}
//
// Now define three packages, each implementing
// a new instance of: demo()
//
//
#2
loadpackage(DemoPackage1);
loadpackage(DemoPackage2);
loadpackage(DemoPackage3);
...didn't solve it.
The complete solution was identified and documented by other members as seen in the posts below:
http://www.garagegames.com/mg/forums/result.thread.php?qt=21074
http://www.garagegames.com/mg/forums/result.thread.php?qt=35463
...so, it looks like this is a re-occurring problem and people (like me) who really do read every line of documentation and try to run every sample program are the ones who keep running into this...
Maybe The Essential Guide and all the various channels on the GG website where this tut is echoed could fix this before it claims another victom?
Here are the places I could find this tutorial (besides in The Essential Guide) that still were not corrected:
http://www.garagegames.com/docs/tge/general/ch05s02.php
http://tdn.garagegames.com/wiki/TorqueScript
12/17/2005 (7:28 pm)
The solution turned out to be quite a bit more complex than I thought -- just doing loadpackage(DemoPackage1);
loadpackage(DemoPackage2);
loadpackage(DemoPackage3);
...didn't solve it.
The complete solution was identified and documented by other members as seen in the posts below:
http://www.garagegames.com/mg/forums/result.thread.php?qt=21074
http://www.garagegames.com/mg/forums/result.thread.php?qt=35463
...so, it looks like this is a re-occurring problem and people (like me) who really do read every line of documentation and try to run every sample program are the ones who keep running into this...
Maybe The Essential Guide and all the various channels on the GG website where this tut is echoed could fix this before it claims another victom?
Here are the places I could find this tutorial (besides in The Essential Guide) that still were not corrected:
http://www.garagegames.com/docs/tge/general/ch05s02.php
http://tdn.garagegames.com/wiki/TorqueScript
Torque Owner Ryan Mick
Red Witch Entertainment