After that, step through each statement one by one until you hit the error (in R Studio, keep clicking the "Next" button in the console debugger; in base R, keep entering n),
Without seeing the script, it's hard to guess the problem.
In the meantime, the result_create function is probably from the RSQLite package (again, my guess which you can verify). Make sure you're using the most recent version of that package, because this error has been addressed in some situations: issues #217, #207.