Page 1 of 1

Another Gump Question!

Posted: Sat Aug 19, 2006 2:16 am
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.

Posted: Sat Aug 19, 2006 8:41 am
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).

Posted: Mon Aug 21, 2006 1:31 am
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.