DeFirence Posted May 27, 2007 Posted May 27, 2007 Hi all, Im trying to put a varible in a function name. Ive tried both of the following: KickSlot&$SlotNumber() KickSlot&$SlotNumber&() Please help me out, Thanks alot DeF
jefhal Posted May 27, 2007 Posted May 27, 2007 Why?Im trying to put a varible in a function name. ...by the way, it's pronounced: "JIF"... Bob Berry --- inventor of the GIF format
flyingboz Posted May 27, 2007 Posted May 27, 2007 look at Assign() and Eval() Reading the help file before you post... Not only will it make you look smarter, it will make you smarter.
DeFirence Posted May 27, 2007 Author Posted May 27, 2007 Why?Func CheckAllSlots() $SlotNumber = 0 Do $SlotNumber = $SlotNumber + 1 CheckSlotAgainstPlayer() Until $SlotNumber = 10EndFuncFunc CheckSlotAgainstPlayer() CheckSlot() $PlayerName = ClipGet() Read_Player_List() If $PlayerName <> $AnyPlayers Then KickSlot&$SlotNumber&() ElseEndIfEndFunc
jefhal Posted May 27, 2007 Posted May 27, 2007 Why not just pass the $slotnumber to the KickSlot() function by defining it and calling it as: func KickSlot($slotnumber) and KickSlot($slotnumber)?Func CheckAllSlots() $SlotNumber = 0 Do $SlotNumber = $SlotNumber + 1 CheckSlotAgainstPlayer() Until $SlotNumber = 10EndFuncFunc CheckSlotAgainstPlayer() CheckSlot() $PlayerName = ClipGet() Read_Player_List() If $PlayerName <> $AnyPlayers Then KickSlot&$SlotNumber&() ElseEndIfEndFunc ...by the way, it's pronounced: "JIF"... Bob Berry --- inventor of the GIF format
DeFirence Posted May 27, 2007 Author Posted May 27, 2007 look at Assign() and Eval()Thanks Execute works greatDeF
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now