Author Topic: Commands Manager GUI [My First Add-On Ever]  (Read 10610 times)

When you do CommandToServer('b_clearallbricks'); the client is included automatically
function b_clearallbricks(%client)
am I missing something
I thought b_clearAllBricks did not start with commandToServer


and this whole thread is a bit silly now
« Last Edit: July 20, 2015, 11:09:49 PM by phflack »

am I missing something
I thought b_clearAllBricks did not start with commandToServer


and this whole thread is a bit silly now
DragonoidSlayer is using functions like "b_clearAllBricks" so he can modify what the buttons do from the code. That way he doesn't need to edit the GUI itself (even though editing the GUI is easy, he's pretty new - so it's justified for now).

Surely b_clearAllBricks uses CommandToServer to clear all bricks?

Surely b_clearAllBricks uses CommandToServer to clear all bricks?
It actually calls another function, do_clearAllBricks();, which then does the CommandToServer('ClearAllBricks');

but ya its the core function

am I missing something
I thought b_clearAllBricks did not start with commandToServer


and this whole thread is a bit silly now
B_clearallbricks was a function specific to the buttons, called by the buttons. I did it this way, so just in case I did a command wrong, I didn't have to edit fyi, sage it, then restart my blockland, as I cannot edit out of the mission editor

I am on my phone, and autocorrct is a hitch.

there's nothing wrong with using b_clearAllBricks() as a function name, and nothing wrong with the code it contains

i'm just pointing out that it ISN'T commandToServerB_clearAllBric ks(%client) as goth was saying it is

It actually calls another function, do_clearAllBricks();, which then does the CommandToServer('ClearAllBricks');

but ya its the core function
Probably read this wrong, but; we aren't overwriting the function, why do we need to package it?
« Last Edit: July 21, 2015, 02:36:15 PM by Kyuande »

Probably read this wrong, but; we aren't overwriting the function, why do we need to package it?
We don't need to package it because we aren't overwriting it.

there's nothing wrong with using b_clearAllBricks() as a function name, and nothing wrong with the code it contains

i'm just pointing out that it ISN'T commandToServerB_clearAllBric ks(%client) as goth was saying it is
You can do it both ways. If you payed any attention to what Honorabl3 and I were discussing; Using CommandToServer in the UI command is just the shorter way of doing it without creating a second function

Probably read this wrong, but; we aren't overwriting the function, why do we need to package it?
It doesn't need packaged, although I supposed you could package it as GameConnection::ClearAllBricks(%this) if you really wanted to modify the way clearing all bricks works (ex: changing the clear message)

For something simple like this it's not really needed tho

*bump*
I don't want my first add-on to die. :'c