Skip to content

Commit c3690a5

Browse files
sovdeethgitbook-bot
authored andcommitted
GITBOOK-54: No subject
1 parent f46356d commit c3690a5

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

core-concepts/indentation/functions.md

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,10 +75,19 @@ See how the parameter value just goes inside the ()? If you have multiple parame
7575

7676
```applescript
7777
on join:
78-
# a random function that take a player and 3 numbers
79-
giveTenApples2(event-player, 10, 20, 30)
78+
# a random function that take a player and a number list
79+
giveTenApples2(event-player, (10, 20, 30))
80+
81+
function giveTenApples2(player: player, number-list: numbers):
82+
# imagine code here
8083
```
8184

85+
{% hint style="warning" %}
86+
Note that I used `()` around the number list. This is so that Skript doesn't get confused and think that `10, 20, 30` are all different parameters. 
87+
88+
If you're ever experiencing errors or weird bugs with your parameters, try making sure they're surrounded with `()`, it can solve a lot of issues.
89+
{% endhint %}
90+
8291
But we skipped over something earlier. We can give parameters **default values**, too.
8392

8493
```applescript

0 commit comments

Comments
 (0)