Global variable question
by Germain Bataille · in Torque Game Engine · 04/22/2005 (3:39 pm) · 1 replies
I would like to have the cameraMode as global variable.
So I put :
int cameraMode;
in advancedCamera.cc.
I use cameraMode in guiCanvas.cc and I included advancedCamera.h but I get an error :
cameraMode: undeclared identifier.
Can someone explain this to me please?
Thanks
So I put :
int cameraMode;
in advancedCamera.cc.
I use cameraMode in guiCanvas.cc and I included advancedCamera.h but I get an error :
cameraMode: undeclared identifier.
Can someone explain this to me please?
Thanks
About the author
Torque Owner Gary "ChunkyKs" Briggs
Second, make it a script varaible, $pref::cameraMode or something. Then you can grab it from anywhere, and easily set it in script
Making it global in torque, like you want. Hmm. You might need to put extern int cameraMode; in all the files that need it.
Gary (-;
PS I know I'm repeating myself, but whatever you problem is, this probably isn't the best solution.