Blockland Forums > Modification Help
Work around to get %brick as client?
(1/1)
Bloxxed:
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)
Headcrab Zombie:
%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.
Bloxxed:
Yeah, when I use %client = %brick.getGroup().client; it mess' up everything.
Chrono:

--- Quote from: Bloxxed on August 11, 2011, 07:15:03 AM ---Yeah, when I use %client = %brick.getGroup().client; it mess' up everything.

--- End quote ---
It shouldn't, because that's how you have to do it.
Bloxxed:
It does. May I send each one of you the copy of my script to somewhat debug?
Navigation
Message Index

Go to full version