Well, because that parameter is a string. You gave it a function, which is basically saying "Ok script, I want you to place the words ok script go do the function I love pigs in the chat box." That makes no sense.
So, what you do is instead of giving the %par1 a function, give it a string like this:%par1 = "I love pigs!";
That should fix your problem. Hopefully I didn't just make a complete dumbass of myself.
You can use a function in there, however, doing something like
%par1 = getRandom(1,5);
It will only do the getRandom the moment you define that variable, so lets say it got 4, and the event was onActivate, it will ALWAYS show 4, no matter how many times you click it.
I love pigs!(); isn't even proper syntax.
You would either do Ilovepigs(); or "I love pigs!";
And if you did the former, you would have to define said function via
function ILovePigs()
{
return some stuff here;
}