Game Development Community

'Initialize Project' Function Could Not Be Found ...Help!

by Turbosheep · in Technical Issues · 01/22/2010 (3:46 pm) · 4 replies

Hi,

So I'm just getting warmed up with my very first TGB session using this 'Fish Game Tutorial', but after my first line of Torque Script and attempt to test it, the game freezes with the before mentioned error:

''Initialize Project' Function Could Not Be Found,
this could indicate a bad or corrupt common directory for your game.'

The code I put in is this:

//---------------------------------------------------------------------------------------------
// Torque Game Builder
// Copyright (C) GarageGames.com, Inc.
//---------------------------------------------------------------------------------------------

//---------------------------------------------------------------------------------------------
// startGame
// All game logic should be set up here. This will be called by the level builder when you
// select "Run Game" or by the startup process of your game to load the first level.
//---------------------------------------------------------------------------------------------
function startGame(%level)
{
Canvas.setContent(mainScreenGui);
Canvas.setCursor(DefaultCursor);

new ActionMap(moveMap);
moveMap.push();

$enableDirectInput = true;
activateDirectInput();
enableJoystick();

sceneWindow2D.loadLevel(%level);
}

//---------------------------------------------------------------------------------------------
// endGame
// Game cleanup should be done here.
//---------------------------------------------------------------------------------------------
function endGame()
{
sceneWindow2D.endLevel();
moveMap.pop();
moveMap.delete();
}
function FishClass :: onLevelLoaded(%this, %scenegraph)
{
%this.setLineairVelocityX(20);
}

Of course I set the class for 'FishClass'.


Can anyone please help me? I'm using an Ibook G4 version 10.4.11 .

Thanks in advance.

About the author

Recent Threads

  • Coding Question

  • #1
    01/22/2010 (6:18 pm)
    Are you using the demo?
    #2
    01/23/2010 (5:09 am)
    Sorry for the late reply..

    I already solved the problem in the meantime. If anyone cares, this was the solution:

    My Projectname had a space in it. ...

    Thanks anyway.

    #3
    08/06/2012 (12:23 am)
    When a project is built, ideally a main should be created inside the game folder like so:
    a) Include Script Source checked: game/main.cs
    b) Include Script Source unchecked: game/main.cs.dso

    But when I build, no main is created which pops out the 'initialize project' function error. I need to manually copy the file to this folder for it to run.

    I do not have spaces in my path.

    TGB Version: 1.7.6
    System: Win7(64)
    #4
    08/06/2012 (10:38 am)
    Are you running it as an admin?