Game Development Community

Question from beginner person like me

by Chris Farley · in Technical Issues · 11/28/2006 (5:45 pm) · 1 replies

Im trying to add my own script file to load when my game starts up but i dont know how to put it in, it always says error.

heres what im trying to add in:

exec(./player.cs);



im trying to add it into here:

function startGame(%level)
{
   // Set The GUI.
   Canvas.setContent(mainScreenGui);
   Canvas.setCursor(DefaultCursor);
   
   moveMap.push();
   
   if( isFile( %level ) || isFile( %level @ ".dso"))
      sceneWindow2D.loadLevel(%level);
}


how do i add it in so that it will actually work in game?

#1
11/28/2006 (7:14 pm)
First, you need to put it in quotes, like so:
exec("./player.cs");

Second, have you done any tutorials? It's covered in every single one ;)

Third, this should be in the TGB Private Forums (or public if you only have the demo). If you don't see that section of the forums, go to the forums listing (Community->Forums) and click Edit Subscriptions.

Hope that helps!