PtokaX forum

Archive => Archived 4.0 boards => Help with Lua 4 scripts => Topic started by: Droid on 31 March, 2004, 18:04:24

Title: Hub command is displayed AFTER the action has been performed?
Post by: Droid on 31 March, 2004, 18:04:24
I'm sure there's a simple explanation for this but in a script I have written a user can use a command to display some data.  Lets say they type "!help" and then using a series of curUser:SendData calls data is displayed to them in main.  No bot name is used, the data is just displayed.

The routine works fine but the data that is displayed appears BEFORE the actual command on the screen??

i.e.

Here is a bunch of help text
Blah blah blah

!help

What am I doing wrong ?

Title:
Post by: ??????Hawk?????? on 31 March, 2004, 18:38:57
heya m8  

i may be wrong here ( hopefully someone will correct me if i am )

but  the scripts are run in turn ( alphabeticaly i think )

if your script is being executed first then the !help command sent will still be running through all the other scripts before it hits the hub main..   mean while  your script has executed and sent its message.
Title:
Post by: tezlo on 31 March, 2004, 19:17:34
nothing wrong.. with chat and some $commands (see docs/commands_note.txt) you have an option to return 1 from DataArrival and have the hub ignore whatever came in