Jump to content

Recommended Posts

Posted (edited)

I have a poker timer program that has a feature to add a re-buy.  Currently the re-buy is just used to calculate the number of chips at the table and pot size.

 

I am trying to add functionality to keep track of who did the re-buy.

I have added functionality to add players names, which get saved to an array.

 

What I would like the "Add Re-buy" button to do is bring up a second gui with a button for each player currently in the game.

 

Since the number of players changes, I am using a for loop to create the buttons.

 

The problem comes when I try to determine which button was pressed.

 

I am using GUIOnEventMode.

 

Since I don't know how many buttons there will be, I can't create functions for each of the buttons.

 

Instead what I am trying to do is have one Function that all buttons call.

 

This seems to work fine, if i want all the buttons to do the same thing.

 

Is there a way I can use my single function (RebuyAdded) to determine which of the buttons was pressed?

 

Here is the code for my secondary Gui:

<snip>

Edited by Melba23
Code removed
  • Moderators
Posted (edited)

momar33,

I am surprised that as a member of such long standing you appear not to have read the Forum rules. Please read them now (there is also a link at bottom right of each page) - particularly the bit about not discussing game automation - and then you will understand why you will get no help and this thread will now be locked.

M23

Edit: A PM exchange has cleared the OP from any wrongdoing - the script is an aid to a real-life card game with flesh-and-blood players and cardboard cards - but I am leaving the lock in place. :)

The answer to the OP's problem is, of course, @GUI_CtrlId - and the answer to not getting your thread locked unnecessarily is to avoid using the "G-word" when you post. ;)

Edited by Melba23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

  Reveal hidden contents

 

Guest
This topic is now closed to further replies.
×
×
  • Create New...