Author Topic: Brick To Script  (Read 1914 times)

There's no %client in the arguments. You need to use %player.client

Ah okay, I literally ripped it from what Zeblote said, thanks for letting me know!

There's no %client in the arguments. You need to use %player.client


Where did you get that from?

I never included the %client arg and it works fine.

So did you ever try to use those args after it?

Never had to so I didn't.

I never included the %client arg and it works fine.

Then why do you think this is in any way relevant?

Because I fail to see why it wouldn't work other than the %client argument which isn't in my code.

Well, the args are definitely correct.

I just tried this on my server and it actually doesn't work at all, so he will have to go with the way you posted originally. Woops!

package BrickControl
{
   function FxDtsBrick::onActivate(%this, %player, %client, %pos, %vec)
   {
      if(%this.getName() $= "_buyItem")
         messageClient(%client, '', "\c6This is a test.");

      parent::onActivate(%this, %player, %client, %pos, %vec);
   }
};

activatePackage(BrickControl);
« Last Edit: March 11, 2016, 03:10:51 PM by Zeblote »

Well, the args are definitely correct.

I just tried this on my server and it actually doesn't work at all, so he will have to go with the way you posted originally. Woops!

package BrickControl
{
   function FxDtsBrick::onActivate(%this, %player, %client, %pos, %vec)
   {
      if(%this.getName() $= "_buyItem")
         messageClient(%client, '', "\c6This is a test.");

      parent::onActivate(%this, %player, %client, %pos, %vec);
   }
};

activatePackage(BrickControl);


Thank you Zeblote for confirming and thanks Pastrey Crust!

You're welcome for the help and thanks for the argument correction. I'll fix up my code later.