Ah... well.... Several errors, but it's a nice little script to start with and the errors are instructive.
First, you only have one state, the one called "default." That's normal. So, state default starts with the word "default" followed immediately by an open curly bracket, and it ends with a closed curly bracket. Everything else fits between, like so ...
default
{
//Everything else
}
Since you're
in state default, you never have to go to it. So get rid of the line that says "state default;"
Next, you can only have one event of each kind in a state. You can't have
two state_entry events. One has to go. A state_entry event is generally used to initialize variables that will be used later, or to set up handles for events like listen, sensor, timer, etc. You're not doing that, except maybe to set a "starting point" color for your object.
Third, the touch_start event is triggered by someone touching the object. The things you want to have happen need to be in that event. You don't have anything there now, so you'll need to move the color changing stuff to that event.
Finally, if you want to change color with each touch, you have to actually provide a switch to do that. You don't have one. A switch is basically an index variable that changes from positive to negative, or TRUE to FALSE, or whatever, each time you encounter it.
So... here's one way to repair your script..
integer Switch; // This is global variable, defined outside state default, initially == FALSE
default
{
state_entry()
{
llSetColor(<0.0, 0.0, 0.0>, ALL_SIDES); // A starting point
}
touch_start(integer num)
{
if (Switch == FALSE) // Object is black, so you want to make it white
{
llSay(0, "Yes master. Turning on.");
llSetColor(<1.0, 1.0, 1.0>, ALL_SIDES);
}
else // Object is white, so you want to make it black
{
llSay(0, "Noted. Turning off.");
llSetColor(<0.0, 0.0, 0.0>, ALL_SIDES) ;
}
Switch = !Switch; // This reverses the sense of Switch from TRUE to FALSE or vice versa
}
}
There are certainly other ways to write this, and to do it more compactly, but I've left this sample wide open so you can see how the parts work.
Take a look at some of the scripting tutorials at the LSL wiki site
http://wiki.secondlife.com/wiki/LSL_Tutorial for a more complete discussion of these things an others. Welcome to the wonderful world of LSL scripting.