Blockland Forums > Modification Help

Brick setShapeName script

Pages: (1/9) > >>

Furling:

This very my frist make script for event, this my idea making Brick Message. Here my script code:


--- Code: ---registerInputEvent(fxDtsBrick,"onBrick","tBrick Brick");
registerOutputEvent(Brick,"setShapeName","string 25 50",0);
registerOutputEvent(Brick,"setShapeNameColor","paintColor 1",0);
registerOutputEvent(Brick,"setShapeNameDistance","int 0 3000 300",0);
package Event_BrickMessage
{
function Brick::setShapeName(%Brick)
{
Parent::setShapeName(%Brick);
{
$inputTarget_Brick = (%Brick);
}
}

function Brick::setShapeNameColor(%Brick,%color,%client)
{
if(getWordCount(%color) == 1)
{
Parent::setShapeNameColor(%Brick,getColorIDTable(%color));
}
else
{
Parent::setShapeNameColor(%Brick,%color);
}
}
--- End code ---

 I got this error :


--- Quote --- Loading Add-On: Event_BrickMessage (CRC:-2100232448)
Add-Ons/Event_BrickMessage/server.cs Line: 10 - Syntax error.
>>> Some error context, with ## on sides of error halt:
registerOutputEvent(Brick,"setShapeName","string 25 50",0);

registerOutputEvent(Brick,"setShapeNameColor","paintColor 1",0);

registerOutputEvent(Brick,"setShapeNameDistance","int 0 3000 300",0);

package Event_BrickMessage

{

^function Brick::setShapeName(%Brick)

^{

^^Parent::setShapeName(%Brick);

^^{##
##
^^^$inputTarget_Brick = (%Brick);

^^}

^}



^function Brick::setShapeNameColor(%Brick,%color,%client)

^{

^^if(getWordCount(%color) == 1)

^^{

^^^Parent::setShapeNameColor(%Brick,getColorIDTable(%color));

^^}

^^else

^^{

^^^Parent::setShapeNameColor(%Brick,%color);
>>> Error report complete.

ADD-ON "Event_BrickMessage" CONTAINS SYNTAX ERRORS
--- End quote ---

What wrong with this script ?

Destiny/Zack0Wack0:

... I'm confused what you're trying to do here.

Furling:


--- Quote from: Destiny/Zack0Wack0 on August 19, 2010, 06:13:43 PM ---... I'm confused what you're trying to do here.

--- End quote ---
this old blockland v0002

This brick message in my server.

That what I want make this brick message.

lilboarder32:

Your packaging the function Brick::setShapeName(%this)

It should be fxDtsBrick::setShapeName(%this)

Assuming that it is a real method, even though I've never seen it.

Edit: Also, syntax is just wacky here. Didn't take a good look until just now.

Edit2: The syntax error you're getting is right at the opening brackets just after you call the Parent function. Probably just remove the inner set of brackets in your first function and make sure to change Brick to fxDtsBrick. Also, you're not ending the package or activating it.

Headcrab Zombie:


--- Quote from: lilboarder32 on August 19, 2010, 08:10:14 PM ---Assuming that it is a real method, even though I've never seen it.

--- End quote ---
I don't think it is.
Even if it is, it probably would be blocked from use like it is with players

Pages: (1/9) > >>

Go to full version