Or even just miss those words entirely because of the big block of text that is the serpent.block of what was given
What I want is to reword it into "invalid array of prototypes" to be a little more clear in what it means, as well as probably throw in a few newlines to separate the block from the error message.
There's also the possibility of just supporting single prototypes being given to the dataloader, but I'll leave that up to you to choose.
Code: Select all
if type(otherdata) ~= table_string then
error("Invalid array of prototypes:\n\n" .. serpent.block(otherdata, {maxlevel= 1}))
end
if #otherdata == 0 then
return data:extend({otherdata})
end