Toggle menu
876
3.8K
30.2K
279.1K
Catglobe Wiki
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Resource searchByName: Difference between revisions

From Catglobe Wiki
Tungocman (talk | contribs)
Tungocman (talk | contribs)
Line 12: Line 12:
=== <span style="color:#DF8621;">'''Arguments'''</span>  ===
=== <span style="color:#DF8621;">'''Arguments'''</span>  ===


*ResourceName: is a string. It is the name of resource which user want to look up.  
*ResourceName: is a string. It is the pattern of name of resource which user want to look up.  
*ResourceType: is a value of Resource type constants. Or we can also use the name of [[CGS_Constants_list|Resource type constants]].  
*ResourceType: is a value of Resource type constants. Or we can also use the name of [[CGS_Constants_list|Resource type constants]].  
*ResourceTemplateResourceID: is a number. It is the resource id of resource template ID. This value can be set 0 if don't care which template to search for.  
*ResourceTemplateResourceID: is a number. It is the resource id of resource template ID. This value can be set 0 if don't care which template to search for.  

Revision as of 09:41, 21 December 2011

Resource_searchByName


Search a specific resource by name.

Syntax

Resource_searchByName(ResourceName, ResourceType, ResourceTemplateResourceID, SearchType, SearchMaxCount)

Arguments

  • ResourceName: is a string. It is the pattern of name of resource which user want to look up.
  • ResourceType: is a value of Resource type constants. Or we can also use the name of Resource type constants.
  • ResourceTemplateResourceID: is a number. It is the resource id of resource template ID. This value can be set 0 if don't care which template to search for.
  • SearchType: is a number. It's the value of the Search type constants. Or we can aslo use the name of the Search type constants.
  • SearchMaxCount: is a number.

Return type

An array, which contain the information of resource was found.

Examples

string RName = "phong";

number RType = Resource_Type_Report;

number RTempRID = 0;

number NSType = 1;

Number SMcount= 1;

array Result = Resource_searchByName(RName, RType, RTempRID, NSType); 

print(Result); 

//{{10,37257205,Phong report 2,12,37246022,34409964},{10,37257212,Phong report 1,12,37246022,34409964},{10,37272405,phong report 3,12,37246022,34409964},{10,37272427,Phong report 4,12,37246022,34409964},{10,37272501,phong,12,37272491,34409964}}