code: func (e *GameEvent) GetInt32(name string) (int32, error) {
  	// Get the key from the message
  	k, err := e.getEventKey(name)
  	if err != nil {
  		return 0, err
  	}
  
  	// Return based on the type.
  	switch k.GetType() {
  	case gameEventTypeLong:
  		return k.GetValLong(), nil
  	case gameEventTypeShort:
  		return k.GetValShort(), nil
  	case gameEventTypeByte:
  		return k.GetValByte(), nil
  	}
  
  	return 0, _errorf("field %s: expected int, got %s", name, gameEventTypeNames[k.GetType()])
  }
docs: // Gets the integer value of a named field.