BrunoMine wrote:According to the documentation, this should be a table, not a string.
The documentation does not say this should be a table, the square brackets indicate that the argument is optional. Entity `staticdata` is stored as a string, usually this will be a serialized table unless you only need to store a single value.
Edit: On closer inspection the example give on that wiki page is incorrect, it should probably look something like this:
local staticdata = minetest.serialize({naked = true})
local obj = minetest.add_entity({x=0, y=10, z=0}, "mobs:sheep", staticdata)
if obj then
obj:setacceleration({x=0, y=-10, z=0})
end