start_script for text commands?

Get Help on scripting in POL with configurations, config setups, script trouble shooting, etc.
Post Reply
mr bubbles
Grandmaster Poster
Posts: 120
Joined: Thu Jan 18, 2007 2:34 am

start_script for text commands?

Post 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]
Bracco
Adept Poster
Posts: 80
Joined: Thu Dec 28, 2006 11:52 am

Post by Bracco »

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

that's supposing its in a package called "brothel"
mr bubbles
Grandmaster Poster
Posts: 120
Joined: Thu Jan 18, 2007 2:34 am

Post 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.
Bracco
Adept Poster
Posts: 80
Joined: Thu Dec 28, 2006 11:52 am

Post 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
mr bubbles
Grandmaster Poster
Posts: 120
Joined: Thu Jan 18, 2007 2:34 am

Post 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.
Bracco
Adept Poster
Posts: 80
Joined: Thu Dec 28, 2006 11:52 am

Post by Bracco »

hm now that i look more carefully, try using / instead of \
SMJ
Grandmaster Poster
Posts: 113
Joined: Wed May 10, 2006 5:15 pm

Post by SMJ »

Try using

Code: Select all

start_script(":brothel:commands\coun\addhooker", array{ who, "" });
User avatar
tekproxy
Forum Regular
Posts: 352
Joined: Thu Apr 06, 2006 5:11 pm

Post by tekproxy »

Use forward-slashes (back-slashes are ignored):

Code: Select all

Start_Script(":pkgName:commands/gm/script");
SMJ
Grandmaster Poster
Posts: 113
Joined: Wed May 10, 2006 5:15 pm

Post by SMJ »

Doh! That's what I forgot! :P Backwards slashes mean escape sequences *slaps his forehead*
mr bubbles
Grandmaster Poster
Posts: 120
Joined: Thu Jan 18, 2007 2:34 am

Post by mr bubbles »

awesome the forward slash worked. thanks for all the help guys :)
User avatar
tekproxy
Forum Regular
Posts: 352
Joined: Thu Apr 06, 2006 5:11 pm

Post 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"));
Post Reply