Ok I've got the notecard reader working by modeling it after the code I found on lslwiki. now for the state change. I've added a simple state the just does an llSay(0,"Done reading notcards"

; which I call from a function. The problem is I keep getting the following error when i try to compile/debug in LSLEditor.
'state(string)' is a 'method' but is used as a 'type'
See below for the code as I have it.
//
// Access Lists
list owners;
list admins;
list visitors;
//Notecards
string notecardname1 = "owners"; // System Owners
string notecardname2 = "admins"; // System Admins
string notecardname3 = "visitors"; // Authorized Visitors
// Variables used for reading notecards
string notecardname; // Notecard name
key notecardquery; // Notecard query
list templineslist; // Temp variable to hold notecard contents
integer notecardline; // Notecard line counter
integer templistlength; // Temp variable for length of templineslist
// Begin Custom Functions
// Start Notecard Reader
initialize(string _action) {
if (_action == ""

{
loadNoteCard(notecardname1);
} else if (_action = "finish"

{
integer end = llGetListLength(owners);
integer i;
for (i = 0; i< end; i++) {
llSay(0, llList2String(owners,i));
}
end = llGetListLength(admins);
for (i = 0; i< end; i++) {
llSay(0, llList2String(admins,i));
}
end = llGetListLength(visitors);
for (i = 0; i< end; i++) {
llSay(0, llList2String(visitors,i));
}
state start;
}
}
// Load the first line of the notecard
loadNoteCard( string _notecard ) {
templineslist = []; //clear the temp lines
notecardname = _notecard;
notecardline = 0;
notecardquery = llGetNotecardLine(notecardname, notecardline);
}
// Called when the end of a notecard is reached
notecardFinished(string _notecard){
integer i;
string templistline;
// Notecard 1
if (_notecard == notecardname1) {
templistlength = llGetListLength(owners);
// verify we only load keys into the owners list
for ( i = 0 ; i < templistlength; ++i ) {
templistline = llList2String(owners,i);
if ( GetType(templistline) == 4 ) {
owners += templistline;
}
}
// Load the next card
loadNoteCard(notecardname2);
} else if (_notecard == notecardname2) {
templistlength = llGetListLength(admins);
// verify we only load keys into the owners list
for ( i = 0 ; i < templistlength; ++i ) {
templistline = llList2String(admins,i);
if ( GetType(templistline) == 4 ) {
owners += templistline;
}
}
// Load the next card
loadNoteCard(notecardname3);
} else if (_notecard == notecardname3) {
templistlength = llGetListLength(visitors);
for ( i = 0 ; i < templistlength ; ++i ) {
templistline = llList2String(visitors,i);
if ( GetType(templistline) == 3 ) {
visitors += templistline;
}
}
initialize("finish"

;
}
}
// Function to verify variable types
integer GetType(string var)
integer n = llGetListLength(llParseStringKeepNulls(var, ["1", "2", "3", "4"], [])) - 1;
n += llGetListLength(llParseStringKeepNulls(var, ["5", "6", "7", "8"], [])) - 1;
n += llGetListLength(llParseStringKeepNulls(var, ["9", "0", ".", "<"], [])) - 1;
n += llGetListLength(llParseStringKeepNulls(var, [">", " ", ",", "-"], [])) - 1;
if(n == llStringLength(var))
{
if(llSubStringIndex(var, "<"

!= -1 || llSubStringIndex(var, ">"

!= -1)
{
if(llGetListLength(llParseStringKeepNulls(var, [","], [])) == 3) {
return TYPE_VECTOR;
} else {
return TYPE_ROTATION;
}
} else {
if(llSubStringIndex(var, "."

!= -1) {
return TYPE_FLOAT;
} else {
return TYPE_INTEGER;
}
}
} else {
if(llStringLength(var) == 36 && llGetListLength(llParseStringKeepNulls(var, ["-"], [])) == 5) {
return TYPE_KEY;
} else {
return TYPE_STRING;
}
}
}
default
{
//integer i;
state_entry()
{
// numnotecards = llGetListLength(notecards);
initialize(""

;
}
dataserver(key _query_id , string _data)
{
if (_query_id == notecardquery) {
// this is a line of our notecard
if (_data != EOF) {
// increment line count
templineslist += [_data];
//request a next line
notecardline++;
notecardquery = llGetNotecardLine(notecardname, notecardline);
} else {
//The notecard has been read
//notify end of read
notecardFinished(notecardname);
}
}
}
}
state start
{
state_entry()
{
llSay(0,"Done"

;
}
}
// end code
I don't see a problem but it will not compile. if I remove the call to change states it works and reads the notecards placing the contents into 3 separate lists.
What am I missing?