I compiled that exact code and it worked just fine. Make sure you have WeaponHandling.inc inside your include folder.
Code:
//SourceMod Batch Compiler
// by the SourceMod Dev Team
//// test.sp
//
// Code size: 3676 bytes
// Data size: 2328 bytes
// Stack/heap size: 16384 bytes
// Total requirements: 22388 bytes
//
// Compilation Time: 0.14 sec
// ----------------------------------------
Press enter to exit ...
__________________