We're hitting the language barrier now. :) You should go read Programming in Lua [1] first, so you can learn Lua's syntax and how it works. Here's the corrected version of your code though:
function test_send(name, line, wildcards)
Note("Sending to " .. wildcards[1])
SendNoEcho("greet " .. wildcards[1])
end
Thanks a lot! I really don't understand lua fully and I do have a background in programming. I did exactly what you said with the Regular Expression but that didn't seem to work so I used normal patterns.
Twisol said:
Four things:
2. Functions need () around their arguments. The only exceptions are when you're passing a table or a string, and it has to be the only argument.
3. %1 isn't part of the Lua syntax, it's something the trigger (and alias) dialog does. You want to use wildcards[1] (the wildcards table is passed as a parameter to your script function)
That's what I didn't know and again, thanks for the clearing up :)
Amended on Sat 16 Apr 2011 08:27 PM (UTC) by Twisol
Message
Four things:
1. Note is capitalized. Variables in Lua are case-sensitive.
2. Functions need () around their arguments. The only exceptions are when you're passing a table or a string, and it has to be the only argument.
3. %1 isn't part of the Lua syntax, it's something the trigger (and alias) dialog does. You want to use wildcards[1] (the wildcards table is passed as a parameter to your script function) [EDIT]: 4. You're mixing normal patterns with regular expressions. Change the * to a (.*?) and make sure 'Regular expression' is checked, or remove the ^ and $ (and the spaces next to them, I assume) and make sure 'Regular expression' is unchecked.
The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).
To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.