Author Topic: Work around to get %brick as client?  (Read 533 times)

Hey, I've been trying numerous attempts to do some stuff for my CityRPG.
I've decided to put some other stuff in, but it seems that %client = %obj.client; doesn't work
But I've been told to do %Obj.getbricktype or something or other, the thing works, but it conflicts with the bankbricks and breaks everything. For some reason whenever I use %client it still doesn't work.

This is the code below that I just need fixing.

        function fxDTSBrick::onPlant(%brick)
        {       
                parent::onPlant(%brick);
               //What should I put here to define %obj as client?
                if(CityRPGData.getData(%client.bl_id).valueJobID == 21)

%client = %brick.getGroup().client;

I tried just '%client = %brick.client;' but it just said -1

As for the couple things you said using %obj - %obj is undefined in the snippet you gave.

Yeah, when I use %client = %brick.getGroup().client; it mess' up everything.

Yeah, when I use %client = %brick.getGroup().client; it mess' up everything.
It shouldn't, because that's how you have to do it.

It does. May I send each one of you the copy of my script to somewhat debug?