NAME
====
  vg_nw_setvar() - define a network variable for player-data


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


DESCRIPTION
===========
  Defines a network variable in the player-data.

  As described in Understanding network, in the player-data
  the values for each player are set and sent to each player by the master.
  Therefore master and clients have to set the same network variables
  in the player-data.

  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_setvar(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_getvar()
  vg_nw_setcommon()
  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()