#Is this how you end a function?
9 messages · Page 1 of 1 (latest)
Once your ticket has been resolved, please close it with </ticket close:1054771505520717835> command!
let tip = (item, desc, info1, info2, info3) =>{
event.addAdvanced([item],(item, advanced, text) => {
text.add(1, [
Text.of(desc).gray()
])
text.add(2, [
Text.of(' '+info1).aqua()
])
if(info2 != ''){
text.add(3, [
Text.of(' '+info2).aqua()
])
} else {return}
text.add(4, [
Text.of(' '+info3).aqua()
])
})
}
tip(CR+'water_wheel', 'Minimum RPM:', '8')
tip(CR+'large_water_wheel', 'Minimum RPM:', '4')
tip(CRN+'stirling_engine', 'RPM at ˚T/s:', '8 at 50.0 ˚T/s', '16 at 100.0 ˚T/s')
tip(CRN+'heater', 'Heat at ˚T/s:', 'Passive at 50.0 ˚T/s', 'Heated at 100.0 ˚T/s', 'Super-heated at 400.0 ˚T/s')
this is the full code
i may need an example script because i didnt do loop yet in java tho i understand how it works. Tried looking at example scripts and support but nada
let tip = (item, desc, info1, info2, info3) =>{
event.addAdvanced([item], (item, advanced, text) => {
text.add(1, [
Text.of(desc).gray()
])
text.add(2, [
Text.of(' '+info1).aqua()
])
if(info2 != undefined){
text.add(3, [
Text.of(' '+info2).aqua()
])
} else {return}
if(info3 != undefined) {
text.add(4, [
Text.of(' '+info3).aqua()
])
} else {return}
})
}
tip(CR+'water_wheel', 'Minimum RPM:', '8')
tip(CR+'large_water_wheel', 'Minimum RPM:', '4')
tip(CRN+'stirling_engine', 'RPM at ˚T/s:', '8 at 50.0 ˚T/s', '16 at 100.0 ˚T/s')
tip(CRN+'heater', 'Heat at ˚T/s:', 'Passive at 50.0 ˚T/s', 'Heated at 100.0 ˚T/s', 'Super-heated at 400.0 ˚T/s')
i went with this instead