NAME
====
  vg_nw_setcommon() - define a network variable for common data


SYNOPSIS
========
  int vg_nw_setcommon(int type, int size, const char * name)


DESCRIPTION
===========
  Defines a variable for the common-block.

  The common-block is used for data not belonging to any player but interesting
  for all players and can be modified only by the master player.
  Refer to Understanding network for a description.

  type is the type of the variable, one of:
   - NWVAR_CHAR    (type: char)
   - NWVAR_UCHAR   (type: unsigned char)
   - NWVAR_SHORT   (type: short int)
   - NWVAR_USHORT  (type: unsigned short int)
   - NWVAR_INT     (type: int)
   - NWVAR_UINT    (type: unsigned int)

  size is the number of elements (arraysize)

  name is an unique name of the variable as a string

  E.g. if you want to set a "short vti[9]", you would call
    vg_nw_setcommon(NWVAR_SHORT,9,"vti")

  This function must be called before connecting to the server
  (vg_nw_startserver() for master, or vg_nw_connect() for clients).


RETURN VALUE
============
  It returns 1 if it succeeds
  or 0 if this variable could not be saved (no space left)
  or -1 for an error.
  A message is given out to stderr, if the return value is not 1.


SEE ALSO
========
  Index
  Understanding network
  vg_nw_setplayer()
  vg_nw_startserver()
  vg_nw_connect()
  vg_nw_waitforconnects()
  vg_nw_setvar()
  vg_nw_getvar()
  vg_nw_getcommon()
  vg_nw_dumppacket()
  vg_nw_sendinit()
  vg_nw_recvinit()
  vg_nw_myplayer()
  vg_nw_maxplayer()
  vg_nw_virtualplayer()
  vg_nw_isalive()
  vg_nw_recvkeys()
  vg_nw_keypressed()
  vg_nw_mousepressed()
  vg_nw_mousex()
  vg_nw_mousey()
  vg_nw_senddata()
  vg_nw_sendcommon()
  vg_nw_setdead()
  vg_nw_dumpsprite()
  vg_nw_undumpsprite()
  vg_nw_close()