Blockland Forums > Modification Help
phflack's thread of questions
phflack:
problem, i was trying to modify the function, but "ERROR: function declaration failed: fxDTSBrick::getDistanceFromGround"
can i modify it on a per brick type basis instead of global? i was just testing with a brick ID
also, aparently if the brick is floating it returns 2147483647, i'm guessing 2^N - 1?
edit:
testing stuff
--- Code: ---datablock fxDTSBrickData(DuckBrickData : brick4x4FData)
{
category = "Special";
subCategory = "Misc";
uiName = "DUCKS GO QUACK";
}
function DuckBrickData::getDistanceFromGround(%brick, %a, %b, %c)
{
return 0;
}
--- End code ---
it says it has a syntax error, what did i do wrong?
line 7, "...function ##D##uckBrickData..."
copied the stuff from city RP, couldn't find any other examples with brick making + functions
(JVS is rather scattered it seems, and i can't find the older versions in my files)
Treynolds416:
--- Quote from: phflack on June 22, 2012, 07:22:24 PM ---problem, i was trying to modify the function, but "ERROR: function declaration failed: fxDTSBrick::getDistanceFromGround"
can i modify it on a per brick type basis instead of global? i was just testing with a brick ID
also, aparently if the brick is floating it returns 2147483647, i'm guessing 2^N - 1?
--- End quote ---
You could try .hasPathToGround(), but you probably can't package that either
phflack:
it's not a function, just tried with isfunction();
but what's the syntax error?
Brian Smithers:
the datablock's } has to be };
phflack:
oops, thanks