Another Gump Question!

Get Help on scripting in POL with configurations, config setups, script trouble shooting, etc.
Post Reply
Damien
Adept Poster
Posts: 82
Joined: Sat Apr 15, 2006 11:50 am

Another Gump Question!

Post by Damien »

Hello!

I wonder if anyone could help me with a button question it would be great!

My question is to make so if you click a button it will start the script "kill"..
too make it an easy example.
soo take a look at this:

Code: Select all

      "nodispose", 
      "nomove",    
      "page 0",    
      "resizepic 55 55 9250 550 450",
      "text 260 120 123 0",
      "button 295 120 4017 4019 0 2 1"
      }; 

var gfdata := {   
      ".Kill"
      }; 
var choice := SendDialogGump( who, gflayout, gfdata ); 

if(choice[0] == 1) 
[u]What shall i write in here to start the script "kill"?[/u]
endif

Thats just some parts of the script
I tried with Start_Script etc.. but it didnt work :cry:

I appreciate all replies :)
Thanks.
User avatar
Tritan
Grandmaster Poster
Posts: 147
Joined: Sat Feb 04, 2006 8:17 am

Post by Tritan »

When you use the Start_Script function you have to make sure you include the complete path to the script.

For instance Start_Script( "../scripts/textcmd/coun/kill", who ) if your script is in the /scripts/textcmd/coun folder. If you moved your commands to a package you would use that pathing. Start_Script(":pkgname:kill", who).
Bytehawk
Apprentice Poster
Posts: 56
Joined: Fri Feb 03, 2006 2:25 am

Post by Bytehawk »

And don't forget - I made this mistake about a hundred times, wondering why nothing happened - that start_script takes only one parameter. So if you want to send more then one, you'll have to put them in an array or struct and split that up at the start of the script called.
Post Reply