Game Development Community

Why doesn't it work??

by AIDan · in Torque Game Engine · 02/06/2002 (7:14 am) · 3 replies

%file.openForWrite($modDebugFile, false);
Wrong number of arguments!

www.garagegames.com/docs/torque.sdk/engine/classFileObject.php

greetings
Daniel

#1
02/06/2002 (7:27 am)
Maybe this C++ function wasn't created as a console function? Basically, there is a ConsoleFunction() {} syntax that must be used to allow a routine to be accessed via scripts (I believe). Check out platformWIN32/winConsole.cc. You will see an example of ConsoleFunction there.
#2
02/06/2002 (8:48 am)
The function is accessible.
The error is the "Wrong number of arguments".

greetings
Daniel
#3
02/06/2002 (12:19 pm)
The function is designed to accept only one arg. You're trying to pass two. Get rid of the false arg and it should work.

That bool is supposed to tell it whether to append or not. But it looks like it was taken out. Now there's a function called openForAppend().

They must have changed it some time after the docs were made.


Dark