#join function not working correctly
47 messages · Page 1 of 1 (latest)
Once your ticket has been resolved, please close it with </ticket close:1054771505520717835> command!
Paste version of plank_recipes.js, server.log from @wise mauve
what should it do?
join with an underscore
rather than a comma
because I have specified underscore in the join function
oh 
1.19 so i dont think this will be fixed any time soon
cuz rhino is mostly abandoned now

so you might just have to make a function which does that yourself
or override the current one
well that's annoying, luckily making it myself isn't overly difficult
loop through elements in the array and just concatenate them, if it isn't the last element also add an underscore
shouldn't be
or I could cheat since I know I only ever have 1 or 2 elements and could just check if I had 2 elements wedge an underscore in
I'm probably going to do that because shoddy design that I'm going to kick myself over for the win
should this be tagged as a mod bug?
okay this gets weirder
just custom wrote behaviour
same issue
??
Paste version of plank_recipes.js, server.log from @wise mauve
Array.prototype.join = i => {
i = i ?? ','
let result = ''
for (let j = 0; j < this.length; j++) if(j!=this.length-1) result+=`${this[j]}${i}`
return result
}
not tested
I'd try that but what is happening here
how is it still using comams
*commas
did you save the file? 
yup...
also I've fixed my indenting issue but js isn't indent sensitive so that doesn't fix it...
wtf is happening
what is wrong with it???
how is it managing to not interpret plank[0] + "_" + plank[1]
and adding a comma instead
I do not understand
how
@oak sonnet Nevermind I figured out the issue, the whole reason the join function wasn't working, all of it, boiled down to me forgetting to set the output to plank
so it never actually got set
so it stayed as a list...
the join function does work
Wow I knew I was tired but didn't think I was this tired
and to think we all missed it...
Ticket closed!
Thanks for cooperating with my stupidity xD