You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: core-concepts/indentation/functions.md
+11-2Lines changed: 11 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -75,10 +75,19 @@ See how the parameter value just goes inside the ()? If you have multiple parame
75
75
76
76
```applescript
77
77
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
80
83
```
81
84
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
+
82
91
But we skipped over something earlier. We can give parameters **default values**, too.
0 commit comments