Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

Quick question


Diskmaster
 Share

Recommended Posts

Yea, that's what Reply#1 did for you.

First he made a new sub called "Blah", which took in the player's index, and a variable called "Blah".

Then, in the second code, he had Case 0 call that sub.

If you wanted to call this sub:
```
Sub coolio(Index, Cool)
Call Playermsg(Index, "-_-", RED)
Exit Sub

```Then you would use this code:
```
Call coolio(Index, 5)

```Assuming you wanted to pass the number "5" in-place for whatever variable "cool" is.

See, when you use even, "Call PlayerMsg", you're calling a sub named "PlayerMsg", if you look in the source, you'd see this:
```
Public Sub PlayerMsg(ByVal Index As Long, ByVal Msg As String, ByVal Color As Byte)
    Call SendDataTo(Index, "PLAYERMSG" & SEP_CHAR & Msg & SEP_CHAR & Color & END_CHAR)
End Sub

```So "PlayerMsg" is the sub, and you call it by saying "Call PlayerMsg", just as you would call any of your subs in the main.txt, in Reply#1's case, he was calling a sub he just made called "Blah(index, blah)"
Link to comment
Share on other sites

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
 Share

×
×
  • Create New...