Page 1 of 1

start_script for text commands?

Posted: Thu Jan 18, 2007 11:40 pm
by mr bubbles
Is it possible to use start_script with a text command?

say i got the script brothel\commands\coun\addhooker.src

I need to fire that script again from within the same script, but no matter what i seem to try it doesn't work.

Is this the proper format for it?

Code: Select all

start_script(":brothel:commands:coun\addhooker", who);
cheers[/code]

Posted: Fri Jan 19, 2007 12:33 am
by Bracco
start_script(":brothel:commands\coun\addhooker", who);

that's supposing its in a package called "brothel"

Posted: Fri Jan 19, 2007 3:45 am
by mr bubbles
That doesn't work either for some reason. I've tried referencing it to other txt commands but it doesn't work.

Posted: Fri Jan 19, 2007 3:53 am
by Bracco
mr bubbles wrote:That doesn't work either for some reason. I've tried referencing it to other txt commands but it doesn't work.
is "brothel" the pkg name defined in pkg.cfg? is that script compiled ?

guess it's for one of these reason it does not work

Posted: Fri Jan 19, 2007 4:16 am
by mr bubbles
yep, the package name is set and i know pol is reading it because im using the text command.

I got a script in the "brothel" base folding launching no probs with start_script, just not in cmds.

I've checked the paths, spelling over and over but its all correct.

I've never tried triggering a textcmd script before.

Posted: Fri Jan 19, 2007 7:10 am
by Bracco
hm now that i look more carefully, try using / instead of \

Posted: Fri Jan 19, 2007 11:42 am
by SMJ
Try using

Code: Select all

start_script(":brothel:commands\coun\addhooker", array{ who, "" });

Posted: Fri Jan 19, 2007 1:58 pm
by tekproxy
Use forward-slashes (back-slashes are ignored):

Code: Select all

Start_Script(":pkgName:commands/gm/script");

Posted: Fri Jan 19, 2007 2:31 pm
by SMJ
Doh! That's what I forgot! :P Backwards slashes mean escape sequences *slaps his forehead*

Posted: Fri Jan 19, 2007 3:36 pm
by mr bubbles
awesome the forward slash worked. thanks for all the help guys :)

Posted: Fri Jan 19, 2007 9:31 pm
by tekproxy
That's true. I perfer to use single forward-slashes (unix fan), but you could also write it with double back-slashes:

Code: Select all

Start_Script(":pkgName:commands\\gm\\script"));