Game Development Community

datablocks tutorial

by Byron Qian · in Torque Game Builder · 02/16/2010 (6:08 am) · 7 replies

hello,

I just tried datablocks tutorial. I created a Config Datablock and named configs.cs. Then I added the "exec("./gameScripts/configs.cs");" to main.cs, but when I dragged the logo to the screen and opened the edit tab, the list of Config datablock was empty. I don't know where I got wrong.

Greeting! :)

#1
02/16/2010 (11:35 pm)
Did you Reload the project (Project->Reload Project) or restart the editor before trying to use the datablock?

If so, and you're still having the problem, open the console (~) and see if there are any errors showing up.
#2
02/16/2010 (11:56 pm)
I already reload the project several times, but it is still not working, and the report from the console that seems no problem.
Actually I got the same problem with behaviors, the list of the behaviors is empty, but after I reopen the different projects it is now working.
#3
02/17/2010 (12:53 am)
Are you sure that you are editing the correct files? Make sure you've actually got the right project loaded in TGB and are editing files in the correct directory.
#4
02/17/2010 (2:13 am)
The project is quite simple. I checked every process and the directory many times, but I still can not find out the problem. Is there any other possible reason?
#5
02/17/2010 (2:45 am)
Sorry, I hadn't read your first post properly. Move your exec("./gameScripts/configs.cs"); from main.cs to your gameScripts/game.cs (changing the exec command to exec("./configs.cs");) within the startGame() function.
#6
02/17/2010 (3:12 am)
I changed the directory, but there is no difference. Does the problem in the script(config.cs)?
#7
02/18/2010 (3:47 pm)
Put them in gameScripts/datablocks.cs This file is specifically looked for by the editor to ensure not only your game runtime has access to it but the editor as well. In the development timeline of TGB there was a change that caused this and that tutorial wasn't completely updated.