PenUltima Online

It is currently Fri Sep 05, 2008 1:04 pm

All times are UTC - 8 hours




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: Another Gump Question!
PostPosted: Sat Aug 19, 2006 2:16 am 
Offline

Joined: Sat Apr 15, 2006 11:50 am
Posts: 66
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:
      "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.


Top
 Profile  
 
 Post subject:
PostPosted: Sat Aug 19, 2006 8:41 am 
Offline
User avatar

Joined: Sat Feb 04, 2006 8:17 am
Posts: 137
Location: Illinois, USA
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).

_________________
2nd place is the 1st loser.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Aug 21, 2006 1:31 am 
Offline
User avatar

Joined: Fri Feb 03, 2006 2:25 am
Posts: 56
Location: Germany, Franconia
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.

_________________
Image


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC - 8 hours


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
Style based on FI Subice by phpBBservice.nl