@Benhero says good thing, something doesn't show up. Did you checked the horse_level is initialized? You know, this is extraordinary bug, and you must do this while you changing something in source. Good practice is making backup of files (if you want some batch script just tell) because you can easily check what you do wrong.
Anyway, i tell you what you must do.
1. Check how horse_stamina binding to your horse from database to last function which give this information to client. Check everything, every function, every variable, just as i said, everything. (in this way you'll learn how this made, i recommend to you to use rubber duck debugging (if you don't know what is this - [Hidden Content] )
2. Repeat this steps but with horse_level, check everything. you figure out what's wrong, but this take some time.
Sorry, there isn't easy way to figure out, nobody without your source don't want to help you, someone can help you via TeamViewer of course but... cost, you know how it works. Even better is to figure out by yourself because you can learn something