Renegade Public Forums
C&C: Renegade --> Dying since 2003™, resurrected in 2024!
Home » Renegade Discussions » Mod Forum » isin function
isin function [message #456777] Tue, 04 October 2011 06:56 Go to next message
robbyke is currently offline  robbyke
Messages: 348
Registered: September 2010
Location: Belgium
Karma: 0
Recruit
In the old scripts there was this function :

bool isin(string String,string Search) {
	if (String.find(Search) != std::string::npos) return true;
	return false;
}


however in the new 4.0 im not suppossed to use the std classes but i dont understand anything of the new string classes and cant find any information about it.

any help would be appreciated.


Owner of kambot TT server

kambot.freeforums.org
Re: isin function [message #456781 is a reply to message #456777] Tue, 04 October 2011 07:16 Go to previous messageGo to next message
Gen_Blacky is currently offline  Gen_Blacky
Messages: 3250
Registered: September 2006
Karma: 1
General (3 Stars)
No Message Body

http://s18.postimage.org/jc6qbn4k9/bricks3.png

[Updated on: Tue, 04 October 2011 07:16]

Report message to a moderator

Re: isin function [message #456785 is a reply to message #456777] Tue, 04 October 2011 08:20 Go to previous messageGo to next message
danpaul88 is currently offline  danpaul88
Messages: 5795
Registered: June 2004
Location: England
Karma: 0
General (5 Stars)
Try using strstr on the raw character arrays

http://www.cplusplus.com/reference/clibrary/cstring/strstr/


http://steamsignature.com/card/1/76561197975867233.png

[Updated on: Tue, 04 October 2011 08:22]

Report message to a moderator

Re: isin function [message #456796 is a reply to message #456777] Tue, 04 October 2011 10:48 Go to previous message
robbyke is currently offline  robbyke
Messages: 348
Registered: September 2010
Location: Belgium
Karma: 0
Recruit
thnx that worked but how do i define a string or vector.
because ive notice chatcommandclass is gone and im stil searching for a replacement in new scripts.


Owner of kambot TT server

kambot.freeforums.org
Previous Topic: TCW_Temple
Next Topic: Introducing Rp2 C&C Mode!
Goto Forum:
  


Current Time: Tue Dec 03 05:34:55 MST 2024

Total time taken to generate the page: 0.00716 seconds