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
Cg_pham (talk | contribs)
No edit summary
Tungocman (talk | contribs)
Line 1: Line 1:
{{HelpFiles}}
{{HelpFiles}}
= Resource_searchByName  =
= Resource_searchByName  =
[[Category:Resource_Functions]]
__NOTOC__


Search a resource by name.  
Search a resource by name.  
<br>


=== Syntax  ===
=== <span style="color:#DF8621;">'''Syntax'''</span> ===


Resource_searchByName(ResourceName, ResourceType, ResourceTemplateResourceID, NameSearchType, SearchMaxCount)  
Resource_searchByName(ResourceName, ResourceType, ResourceTemplateResourceID, NameSearchType, SearchMaxCount)  
<br>
<br>


=== <span style="color:#DF8621;">'''Syntax'''</span>  ===
=== Arguments  ===
=== Arguments  ===


Line 22: Line 24:
SearchMaxCount: is a number. <br>
SearchMaxCount: is a number. <br>


=== Return type ===  
=== <span style="color:#DF8621;">'''Return type'''</span>  ===


An Array, which contain the information of resource was found. <br>
An Array, which contain the information of resource was found. <br>


=== Examples  ===
=== <span style="color:#DF8621;">'''Examples'''</span> ===
 
<source lang="javascript">
string RName = "phong";
string RName = "phong";


Line 42: Line 44:
print(Result);  
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}} __NOTOC__
//{{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}}
 
</source>
[[Category:Resource_Functions]]

Revision as of 09:21, 21 December 2011

Resource_searchByName


Search a resource by name.

Syntax

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

Syntax

Arguments

ResourceName: is a string. It is a name of resource which user want to look up.

ResourceType: It is a value of Resource type's constant. Or can be used name of Resource Type constant.

RsourceTemplateResourceID: 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.

NameSearchType: It is a value of Name Search type's constant. Or can be used a name of Name Search Type constant.

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}}