As Derision said... Try to remember opening and closing brackets.. Here's an example.. In the sub EVENT_ITEM block you had, you were forgetting the second closing bracket at the bottom which is invalid syntax. With the closing bracket, your syntax would have been fine although it wouldn't have worked the way you wanted ingame.
Quote:
sub EVENT_SAY
{ ##This bracket is opening for the operator below.
if($text=~/hail/i)
{ ##This bracket is opening for the statement below.
quest::say("Hello $name!");
} ##This bracket closes the first opening bracket
} ##This bracket closes the second opening bracket
|
Whenever there is a {, there must always be a } to close it or the syntax is incorrect.
Here is another example in your code that you can learn from.
Quote:
if($text=~/pricelist/i)
{
if ($text=~/heal/i)
{
quest::selfcast(13);
{ ##This must be a closing bracket because of the opening bracket above.
}
|