Author Topic: Can someone fix this server.cs please?  (Read 434 times)

This is supposed to prevent non-admins from planting baseplates or cubes. Thanks!

This is coding help where you say your problem and are told how to fix it. This is not coding fix where you post your junky code and people make it perfect for you.

It's fxDTSBrick::onPlant, not FxBTSBrick::OnPlant.

This is coding help where you say your problem and are told how to fix it. This is not coding fix where you post your junky code and people make it perfect for you.

It's fxDTSBrick::onPlant, not FxBTSBrick::OnPlant.
isn't it actually fxDTSBrickData::onPlant(%this, %obj)

or are there both

isn't it actually fxDTSBrickData::onPlant(%this, %obj)

or are there both
I've always used fxDTSBrick::onPlant(%this, %obj) and it works.

I took your horrifyingly bad script and fixed it.
Tell adam to stop coding until he figures it the forget out.

You can thank me by telling adam the above.

Notice how %obj is never used?

Cause it's not supposed to be there. :)

Edit: Oh, cause he's using FxDTSBrick::onPlant, which is the physical object function, as compared to FxDTSBrickData::onPlant, which is the datablock function.

fxDTSBrick::onPlant(object ID)
fxDTSBrickData::onPlant(datablock ID, object ID)
BrickDatablockNameHere::onPlant(datablock ID, object ID)
« Last Edit: March 28, 2012, 08:42:36 PM by Chrono »

I took your horrifyingly bad script and fixed it.
Tell adam to stop coding until he figures it the forget out.

You can thank me by telling adam the above.

Lug thank you do much!