it might not be 37. try toying around with numbers maybe with a sendmessage(eventClickedSlotIndex);
also, instead of cancel event, do close inventory as that might work better
what you want to do is this:
On Player Click Own Inv()
{
If Variable(gameValue.getClickedIndex>=37)
{
CancelEvent();
}
}
that should work, if it doesn't then tell me :)