Author Topic: Server_ClearGhostBricks  (Read 1857 times)

« Last Edit: September 06, 2014, 11:54:17 PM by Ducky duck »

I think this could've just stayed in add-ons.

Nevermind.
« Last Edit: August 03, 2014, 03:07:58 PM by Maya67 »

This "addon" is not complete, and while it may not cause syntax errors, it has many other errors. Please fix it.

You defined the same function twice, only the second one is gonna work here.

oh my god i love you

 :cookie:

RTB_registerPref("Restriction Level","ClearGhostBricks","OAA::AdminLevel","list Admin 1 SuperAdmin 2","Server_Clearghostbricks",1,0,0);
if(
    (!%client.isAdmin
    && $OAA:AdminLevel == 1)
    ||
    (!%client.isSuperAdmin
    && $OAA:AdminLevel == 2)
) {
    messageClient(%client, "<color:00ffff>Server<color:ffffff>: You don't have permission to clear ghost bricks.");

    return;
}

//This code was brilliantly designed by Jes00 and ThinkInvisable


You're kidding, right? Like you didn't just do this?


oh my god i love you

 :cookie:
Maybe you should read the topic and actually test an add-on before you post.

I love that you're trying to learn to code, that's awesome. But please learn more before you actually try to release something.

Your code doesn't even have a function, doesn't even clear ghost bricks like you says it does, and has this
(!%client.isAdmin&& $OAA:AdminLevel == 1)||(!%client.isSuperAdmin&& $OAA:AdminLevel == 2)

Registering an RTB pref isn't another way to start a function.

if($OAA:AdminLevel && !%client.isAdmin)
   return;

The || sign means "or" and has no place there, at all.

RTB_registerPref("Restriction Level","ClearGhostBricks","OAA::AdminLevel","list Admin 1 SuperAdmin 2","Server_Clearghostbricks",1,0,0);
if(
    (!%client.isAdmin
    && $OAA:AdminLevel == 1)
    ||
    (!%client.isSuperAdmin
    && $OAA:AdminLevel == 2)
) {
    messageClient(%client, "<color:00ffff>Server<color:ffffff>: You don't have permission to clear ghost bricks.");

    return;
}

//This code was brilliantly designed by Jes00 and ThinkInvisable


You're kidding, right? Like you didn't just do this?

Maybe you should read the topic and actually test an add-on before you post.
well... um...
ok fine you got me :(



You're kidding, right? Like you didn't just do this?

Maybe you should read the topic and actually test an add-on before you post.

That wasn't very nice,

I was tired when I put this piece of stuff together and didn't realize my mistake.

That wasn't very nice,

I was tired when I put this piece of stuff together and didn't realize my mistake.
What mistake? Your add-on doesn't even clear ghost bricks, there is no code in it at all that would do it.

I was tired when I put this piece of stuff together and didn't realize my mistake.

It's a good idea to always test your add-ons especially before you release them to the public, not to mention it's pretty much required when releasing add-ons overall. Take the time to learn from the mistakes that were outlined and post a fixed copy once you get this working properly and preferably as efficient as possible if you can, but people will check your code for inefficiencies anyways and will tell you how to do it more efficiently.

What mistake? Your add-on doesn't even clear ghost bricks, there is no code in it at all that would do it.

I deleted that part by mistake, I am trying to fix it but I am having problems.