I hope you may help. I have a really straightforward if / else if with a number of statements. I get a syntax error in the same place in the code, even if I move the statemetns around (so the statemnt that got the syntax error one time is swapped with another statement) and it seems to be the place, not the code. The error comes at line 64 below, or after the else if 22. Is there a limit to how many lines or something? It's a really short, simple script.
ANy help would be greatly appreciated - clearly I'm not anywhere near professional, so I appreciate your patience!
Thanks
Chris (Brent Upshaw)
The code:
default
{
state_entry()
{
llSay( 0, "Script loaded!"
;}
touch_start(integer total_number)
{
// do these instructions when the object is touched.
// choose a random number between 0. and 24.0.
float quote_float = llFrand(24.0);
// recast as integer
integer quote = (integer)quote_float;
//finding and saying a quote
if (quote == 0) {
llSay( 0, "To be, or not to be: that is the question. - (Hamlet, Act III, Scene I)."
;} else if (quote == 1) {
llSay( 0, "Neither a borrower nor a lender be; For loan oft loses both itself and friend, and borrowing dulls the edge of husbandry. - (Hamlet, Act I, Scene III)."
;} else if (quote == 2) {
llSay( 0, "This above all: to thine own self be true. - (Hamlet, Act I, Scene III)."
;} else if (quote == 3) {
llSay( 0, "Though this be madness, yet there is method in 't.. - (Hamlet, Act II, Scene II)."
;} else if (quote == 4) {
llSay( 0, "That it should come to this!. - (Hamlet, Act I, Scene II)."
;} else if (quote == 5) {
llSay( 0, "There is nothing either good or bad, but thinking makes it so. - (Hamlet, Act II, Scene II)."
;} else if (quote == 6) {
llSay( 0, "What a piece of work is man! how noble in reason! how infinite in faculty! in form and moving how express and admirable! in action how like an angel! in apprehension how like a god! the beauty of the world, the paragon of animals! . - (Hamlet, Act II, Scene II)."
;} else if (quote == 7) {
llSay( 0, "The lady doth protest too much, methinks. - (Hamlet, Act III, Scene II)."
;} else if (quote ==
{llSay( 0, "In my mind's eye. - (Hamlet, Act I, Scene II)."
;} else if (quote == 9) {
llSay( 0, "A little more than kin, and less than kind. - (Hamlet, Act I, Scene II)."
;} else if (quote == 10) {
llSay( 0, "The play 's the thing wherein I'll catch the conscience of the king. - (Hamlet, Act II, cene II)."
;} else if (quote == 11) {
llSay( 0, "And it must follow, as the night the day, thou canst not then be false to any man. - (Hamlet, Act I, Scene III)."
;} else if (quote == 12) {
llSay( 0, "This is the very ecstasy of love. - (Hamlet, Act II, Scene I)."
;} else if (quote == 13) {
llSay( 0, "Brevity is the soul of wit. - (Hamlet, Act II, Scene II)."
;} else if (quote == 14) {
llSay( 0, "Doubt that the sun doth move, doubt truth to be a liar, but never doubt I love. - (Hamlet, Act II, Scene II)."
;} else if (quote == 15) {
llSay( 0, "Rich gifts wax poor when givers prove unkind. - (Hamlet, Act III, Scene I)."
;} else if (quote == 16) {
llSay( 0, "Do you think I am easier to be played on than a pipe? - (Hamlet, Act III, Scene II)."
;} else if (quote == 17) {
llSay( 0, "I will speak daggers to her, but use none. - (Hamlet, Act III, Scene II)."
;} else if (quote == 1
{llSay( 0, "When sorrows come, they come not single spies, but in battalions. - (Hamlet, Act IV, Scene V)."
;} else if (quote == 19) {
llSay( 0, "All the world 's a stage, and all the men and women merely players. They have their exits and their entrances - And one man in his time plays many parts - (As You Like It, Act II, Scene VII)."
;} else if (quote == 20) {
llSay( 0, "Can one desire too much of a good thing?. - (As You Like It, Act IV, Scene I)."
;} else if (quote == 21) {
llSay( 0, "I like this place and willingly could waste my time in it - (As You Like It, Act II, Scene IV)."
;} else if (quote == 22) {
llSay( 0, "How bitter a thing it is to look into happiness through another man's eyes! - (As You Like It, Act V, Scene II)."
;} else if (quote == 23) {
llSay( 0, "Blow, blow, thou winter wind! Thou art not so unkind as man's ingratitude. - (As You Like It, Act II, Scene VII)."
;} else if (quote == 24) {
llSay( 0, "True is it that we have seen better days. - (As You Like It, Act II, Scene VII). "
;}
}
}
