This wiki was in read-only mode for many years, but can now be edited again. A lot of information will need to be updated.
Bz APIIntList: Difference between revisions
		
		
		
		Jump to navigation
		Jump to search
		
m Bz APIIntList moved to BzAPIIntList: Name out-of-date  | 
				 →Usage:  Delete the list for proper memory management as an example.  | 
				||
| (2 intermediate revisions by 2 users not shown) | |||
| Line 1: | Line 1: | ||
An array of integers. This is used for passing lists of integers from the BZFS API itself to the plugin that uses the API.  | |||
== Usage ==  | |||
 bz_APIIntList *playerList = bz_newIntList();  | |||
 bz_getPlayerIndexList(playerList);  | |||
 int i;  | |||
 for (i=0;i<playerList->size();i++) {  | |||
         // Use (*playerlist)[i] to grab the integer.  | |||
         bz_sendTextMessage(BZ_SERVER,(*playerlist)[i],"Welcome to the server!");  | |||
 }  | |||
 bz_deleteIntList(playerList);  | |||
Latest revision as of 08:57, 6 October 2011
An array of integers. This is used for passing lists of integers from the BZFS API itself to the plugin that uses the API.
Usage
bz_APIIntList *playerList = bz_newIntList();
bz_getPlayerIndexList(playerList);
int i;
for (i=0;i<playerList->size();i++) {
        // Use (*playerlist)[i] to grab the integer.
        bz_sendTextMessage(BZ_SERVER,(*playerlist)[i],"Welcome to the server!");
}
bz_deleteIntList(playerList);