Solved Functions not working properly

  • Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the comminuty!

    Now, what are you waiting for? Join the community now!

  • LOOKING FOR A VERSION OF SKRIPT?

    You can always check out skUnity Downloads for downloads and any other information about Skript!

Status
Not open for further replies.

AverageGamer590

New Member
Jun 27, 2021
6
0
1
Australia
When I start the code it gives an error. It says that I gave 3 arguments for registerCompressor when it expected 4 on both functions.
# registerCompressor(id, item, uncompressed, compressed)
function registerCompressor(id: number, item: item, uncompressed: item, compressed: item):
set {_compressor::item} to {_item}
set {_compressor::uncompressed} to {_uncompressed}
set {_compressor::compressed} to {_compressed}
set {compressors::%{_id}%} to {_id}
set {compressors::%{_id}%} to {_compressor}
set {compressors::%{_id}%::item} to {_item}
set {compressors::%{_id}%::uncompressed} to {_uncompressed}
set {compressors::%{_id}%::compressed} to {_compressed}

on load:
registerCompressor(1, red dye named "&6&lNetherrack AutoCompressor", 64 of netherrack, shiny nether brick named "&6Compressed Netherrack")
registerCompressor(2, brown dye named "&6&lNetherite AutoCompressor", 64 of netherite ingot, shiny netherite block named "&6Compressed Netherite")

on break:
loop {compressors::*}:
if player has {compressors::%loop-index%::item}:
if player has {compressors::%loop-index%::uncompressed}:
give {compressors::%loop-index%::compressed} to player

command /compressors:
permission: compressor.give
trigger:
set {_gui} to a new chest inventory with 2 row with name "Custom Items"
loop {compressors::*}:
set slot loop-index parsed as integer of {_gui} to {compressors::%loop-index%::item}
open {_gui} to player
[doublepost=1625991435,1625990600][/doublepost]why is this marked as solved i didn't do it
 
Status
Not open for further replies.