VERY basic Scripting problem

Posted by Lippa on Wed 22 Feb 2012 12:01 AM — 4 posts, 19,449 views.

#0
Im sorry to post such a basic problem, but I have searched and searched without finding a solution.

Im trying to learn the basics of scripting in LUA but am facing an uphill battle fro the start as I cant seem to work out how to send commands through scripting :/

Ive tried several ways but all result in the same error

attempt to call global 'send' (a nil value)

I know this is saying that send isnt a recognised command but I dont know why??


with the trigger - "A hopping frog drifts *."

Ive tried :-

-
direction = %1
send(direction)
-
send %1
-
send "%1"
-
world.send %1


but none of them seem to work. Once I learn the basics, Im sure I can work the rest out but this is really stumping me. Thanks in advance for your help.
Amended on Wed 22 Feb 2012 12:02 AM by Lippa
USA #1
For lua the correct syntax would be Send("%1").
Australia Forum Administrator #2
This video about the introduction to scripting might help:

http://www.gammon.com.au/forum/?id=10212
#3
OK, I worked it out - and I must be an idiot - I didnt realise that I had to use a capital S for send!

Thanks