Author Topic: Syntax Error  (Read 760 times)

Like So:


package Response
{
   
      function NMH_Type::Send(%this)
      {
         %message = %this.getValue();
         Parent::Send(%this);
         
         
         
         
         
         //Say Hello.
         
         
         if(striPos(%message, "JSys Speak") > -1 || %message $= "Hi JSys")
            {
         schedule(200, 0, "commandtoServer", 'messageSent', "JSys²: Hey");
            }
         
         //Fish
         if(striPos(%message, "JSys Speak") > -1 || %message $= "JSys we got a fish")
            {
         schedule(200, 0, "commandtoServer", 'messageSent', "JSys²: Hey, fish, shut the hell up.");
            }
};##


I've tried rewriting that line, I dunno.

you're missing a } that closes the function

you can't tell because your formatting is crap: try like this
Code: [Select]
package Response
{
function NMH_Type::Send(%this)
{
%message = %this.getValue();
Parent::Send(%this);

//Say Hello.

if(striPos(%message, "JSys Speak") > -1 || %message $= "Hi JSys")
{
schedule(200, 0, "commandtoServer", 'messageSent', "JSys²: Hey");
}

//Fish
if(striPos(%message, "JSys Speak") > -1 || %message $= "JSys we got a fish")
{
    schedule(200, 0, "commandtoServer", 'messageSent', "JSys²: Hey, fish, shut the hell up.");
}
//note the missing } here
};

Notepad++ Lied to me....
let me try that