Game Development Community

Overwriting datablocks

by Colossai Studios · in Torque Game Engine · 12/09/2005 (4:49 am) · 4 replies

After doing some changes in the engine, I have a problem with datablocks on a client (separate computer) having its datablocks being overwritten. It looks like this in the client log:

A 'AudioProfile' datablock with id: 47 already existed. Clobbering it with new 'TSShapeConstructor' datablock from server.
A 'PrecipitationData' datablock with id: 48 already existed. Clobbering it with new 'DecalData' datablock from server.
A 'AudioProfile' datablock with id: 49 already existed. Clobbering it with new 'DebrisData' datablock from server.
A 'AudioProfile' datablock with id: 50 already existed. Clobbering it with new 'UnitData' datablock from server.
A 'AudioProfile' datablock with id: 51 already existed. Clobbering it with new 'UnitData' datablock from server.
A 'AudioProfile' datablock with id: 52 already existed. Clobbering it with new 'UnitData' datablock from server.
and so on

Does anyone know why this happens, or how to fix it?
thanks

#1
12/12/2005 (4:29 am)
Bump.
#2
12/12/2005 (8:55 pm)
Calling a script more than once? Put an echo in the files containing the datablocks and see if it is being called more than once.
#3
12/18/2005 (5:49 pm)
Wild guess, but are you trying to reassign a datablock or a datablock value? Datablocks should be treated as static constants or unchangeable properties. Sure you can write code in script to change the values, but it doesn't occur across the simulation. Once a datablock is created the server does not keep up with changes.
#4
12/19/2005 (7:50 am)
Greetings!

As it turns out, I've been looking into datablocks a lot recently.

The message you're receiving is from SimDataBlockEvent::process() in gameConnectionEvents.cc (you can find it by doing a search on the source code for the word 'Clobbering' :o) This method is called on the client to set up a datablock that has been passed along from the server.

The 'Clobbering' message is generated when a datablock is received from the server with the same ID as one that already exists on the client, but has a different class. In your specific case above, an existing AudioProfile datablock on the client is being overwritten by a TSShapeConstructor datablock that has been passed by the server (both with an ID of 47).

My best guess is that you're defining an AudioProfile datablock on the client. Datablocks should never be directly built on the client but are instead passed along by the server during the mission load. So check your script files that are called on the client side and clean them of any datablock definitions.

- LightWave Dave