Problem of writing a console function
by Nachi Lau · in Torque Game Engine · 12/09/2003 (12:40 pm) · 1 replies
Hello,
I start to write my console function, what I did it something like this:
In C++ code, I wrote:
ConsoleFunction(GetPixelScale, F32, 1, 1, "My function")
{
return dglGetPixelScale();
}
In my script, I wrote:
function ProcessCommandKey()
{
%i = GetPixelScale();
}
and when the script called function ProcessCommandKey(), the console output an error message which said that it cannot found the function GetPixelScale. Can anyone give me a hand if you know what am I doing wrong?
By the way, I defined my console funciton in dgl.cc
Thanks!!!
Nachi
I start to write my console function, what I did it something like this:
In C++ code, I wrote:
ConsoleFunction(GetPixelScale, F32, 1, 1, "My function")
{
return dglGetPixelScale();
}
In my script, I wrote:
function ProcessCommandKey()
{
%i = GetPixelScale();
}
and when the script called function ProcessCommandKey(), the console output an error message which said that it cannot found the function GetPixelScale. Can anyone give me a hand if you know what am I doing wrong?
By the way, I defined my console funciton in dgl.cc
Thanks!!!
Nachi
Torque Owner Nachi Lau
Nachi