Jump to content

Recommended Posts

Posted

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

Posted

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
Posted

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.

Posted

Why?

Func CheckAllSlots()

$SlotNumber = 0

Do

$SlotNumber = $SlotNumber + 1

CheckSlotAgainstPlayer()

Until $SlotNumber = 10

EndFunc

Func CheckSlotAgainstPlayer()

CheckSlot()

$PlayerName = ClipGet()

Read_Player_List()

If $PlayerName <> $AnyPlayers Then

KickSlot&$SlotNumber&()

Else

EndIf

EndFunc

Posted

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 = 10

EndFunc

Func CheckSlotAgainstPlayer()

CheckSlot()

$PlayerName = ClipGet()

Read_Player_List()

If $PlayerName <> $AnyPlayers Then

KickSlot&$SlotNumber&()

Else

EndIf

EndFunc

...by the way, it's pronounced: "JIF"... Bob Berry --- inventor of the GIF format

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...