NAME ==== vg_nw_getcommon() - return a network variable for common data SYNOPSIS ======== void * vg_nw_getcommon(const char * name) DESCRIPTION =========== After waiting for connections of all players (vg_nw_waitforconnects()) use vg_nw_getcommon() to set the struct pointers for the common-block to the network-variables. name is the unique name given to vg_nw_setcommon(). Example: struct { short * vtc; } common_block; // define a "short vtc[9]" if (vg_nw_setcommon(NWVAR_SHORT,9,"vtc") < 0) { goto error; } // connect to network-server (master: start it) [ ... ] // wait for connects of all players if (vg_nw_waitforconnects() < 0) { goto error; } // get pointer to the network-variable vtc common_block.vtc=(short *)vg_nw_getcommon("vtc"); // set vtc empty memset(common_block.vtc,0,9); Refer to Understanding network. RETURN VALUE ============ It returns a pointer to the defined variable of the common-block or NULL if the variable was not defined. 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_setcommon() 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()