Whenever I write
hero.buildXY("fence" 36, 30)
in Thunderhooves it says

Whenever I write
hero.buildXY("fence" 36, 30)
in Thunderhooves it says

Hello @TygurrsAreArunj and welcome to the forum! 
What do you have equipped?
You have to equip a hammer to be able to build fences, not a sword.
Also, you are missing a comma ‘,’.
my code still does not work
never mind my code does work