I looped an object and tried making it so every client part of the loop gets messaged that they have committed a crime, but when I test it out, nothing happens. There are no errors in the console so it made me confused. Any help would be appreciated:
if(%client.hasGang && %client.Gang !$= "")
{
for(%i = 0; %i < %clientCount; %i++)
{
%clientObject = clientGroup.getObject(%i);
%client = %clientObject.client;
%client.RPData.value["demerits"] += mFloor(%dems);
messageClient(%client, 'centerPrint', "\c6You and your gang have commited a crime [\c3" @ %text @ "\c6]", 3);
}
}