Okay, to the trainerbattle script, I've had this a couple times, and I think its because the original slot there belonged to a Double Trainer battle and its hardcoded that way or something, so just change the slot a few times and it should work. Also its "Chief" not "Cheif"
For the level script, you have a few issues.
1. The value should be 0. In order for it to be 4000, you'd have to put setvar 0x4095 0x4001 somewhere in your script. The value is the value you set your var as - 1.
2. Don't use setflag 0x1017. I'm guessing you're using Fire Red, and that flag is unsafe. Check in the tutorial section for KarateKid's Vars, and Flags tutorial for a list of all the safe flags.
3. Also, that command "SpriteInvisible". I've never seen it before, so I'm not sure if it actually works. To be safe, I'd just move the sprite somewhere off screen and do a setflag then, but just test it first.