Hey,
if I try to make a function in a function, then some parsing errors exists.
Skript Version: Skript 2.5-alpha-3
Skript Author: Bensku
Minecraft Version: 1.12.2
---
Full Code:
And the repeatround function as an example:
The repeatspeed, repeathealth, ... functions have the same structure.
Errors on Reload:
7 errors occurced, so for each repeat function an error with the same structure.
Troubleshooting:
Have you tried searching the docs? No
Have you tried searching the forums? Yes
if I try to make a function in a function, then some parsing errors exists.
Skript Version: Skript 2.5-alpha-3
Skript Author: Bensku
Minecraft Version: 1.12.2
---
Full Code:
Code:
#Monster configuration
function diazombie(round: number, from: number, to: number, apos: number = 1):
repeatround(%{_round}%,%{_from}%,%{_to}%,"adult zombie",%{_apos}%)
repeatspeed(%{_round}%,%{_from}%,%{_to}%,3)
repeathealth(%{_round}%,%{_from}%,%{_to}%,5)
repeatskull(%{_round}%,%{_from}%,%{_to}%,"Steve")
repeatarmor(%{_round}%,%{_from}%,%{_to}%,"diamond")
repeatitem(%{_round}%,%{_from}%,%{_to}%,"diamond sword")
repeatname(%{_round}%,%{_from}%,%{_to}%,"&9&lDiamantzombie")
on script load:
#Round configuration
diazombie(1,1,5,1)
diazombie(2,1,10,1)
And the repeatround function as an example:
Code:
function repeatround(round: number, from: number, to: number, monster: text, apos: number):
set {_rrloop} to "true"
while {_rrloop} is "true":
set {round::%{_round}%::%{_from}%} to {_monster}
set {pos::%{_round}%::%{_from}%} to {pos%{_apos}%}
set {_from} to {_from}+1
if {_from} is greater than {_to}:
delete {_rrloop}
wait a tick
The repeatspeed, repeathealth, ... functions have the same structure.
Errors on Reload:
Code:
The 1st argument given to the function 'repeatname' is not of the required type number. Check the correct order of the arguments and put lists into parentheses if appropriate (e.g. 'give(player, (iron ore and gold ore))'). Please note that storing the value in a variable and then using that variable as parameter will suppress this error, but it still won't work. (config.sk, line 128: repeatname(%{_round}%,%{_from}%,%{_to}%,"&9&lDiamantzombie")')
7 errors occurced, so for each repeat function an error with the same structure.
Troubleshooting:
Have you tried searching the docs? No
Have you tried searching the forums? Yes