Game Development Community

Console not compiling

by Rafael Galindo · in Torque Game Engine · 06/21/2006 (1:14 pm) · 4 replies

I just downloaded Torque 1.4. I was playing around the Console and try to make a "hello world" program.

The code is:

function myworld()
{
echo("Hello World");
}

I save it as helloworld.cs, I run this code from console:

compile("helloworld.cs")

It starts to compile but never ends.
Compiling helloworld.cs.....

Any Idea?

Regards

Rafael

About the author

Recent Threads


#1
06/21/2006 (1:43 pm)
I wasn't aware there actually was a compile command. Learn something new every day. Try using exec() instead. You can see examples of it in just about any other script.
#2
06/21/2006 (2:09 pm)
Hello,

Thanks for your comments.

I also used the exec() command but the same, it says: Compiling helloworld.cs.....

And never ends. Any idea?

Regards
#3
06/21/2006 (3:11 pm)
Does the console give you a new prompt ? i beleave after you exec() your script file you still have to call the function.. unless im mistaken...
#4
06/21/2006 (3:18 pm)
As Casey mentions, you have to call your function.

In your example, type in:

myWorld();