You're missing Parentheses after servercmdClearMusicBricks
There's a ton of other errors (that I'm typing up corrections for), but right now the issue is getting it to show up in the add-ons list
Edit: Try thing, after you get it to show in the list:
function servercmdClearMusicBricks(%client)
{
if(!%client.isAdmin)
return;
camb();
}
function camb()
{
if($Server::BrickCount > 0)
{
messageAll('MsgClearBricks', "\c3" @ %client.getPlayerName() @ "\c0 cleared music bricks.");
%groupCount = MainBrickGroup.getCount();
for(%i = 0; %i < %groupCount; %i++)
{
%group = MainBrickGroup.getObject(%i);
%count = %group.getCount();
for(%j = 0; %j < %count; %j++)
{
%brick = %group.getObject(%j);
if(%brick.getDatablock().getName() !$= "brickMusicData")
continue;
if(!%brick.isPlanted)
continue;
if(%brick.isDead)
continue;
%brick.delete();
}
}
}
}
Issues fixed:
Missing arguments in the serverCmdClearMusicBricks function declaration
If and messageAll placement would result in announcing the clear bricks only if there are bricks on the server, but attempting to clear music bricks even if there are no bricks
Incorrect way of checking if the brick is a music brick
Not doing anything to the brick if it passed exclusion conditions
Missing brackets