Gamestudio Links
Zorro Links
Newest Posts
loading historical data 1st time
by AndrewAMD. 04/14/23 12:54
Trade at bar open
by juanex. 04/13/23 19:43
Bug in Highpass2 filter
by rki. 04/13/23 09:54
Adding Limit Orders For IB
by scatters. 04/11/23 16:16
FisherN
by rki. 04/11/23 08:38
AUM Magazine
Latest Screens
SHADOW (2014)
DEAD TASTE
Tactics of World War I
Hecknex World
Who's Online Now
0 registered members (), 1,012 guests, and 8 spiders.
Key: Admin, Global Mod, Mod
Newest Members
rki, FranzIII, indonesiae, The_Judge, storrealba
18919 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Check a txt file #343692
10/08/10 23:35
10/08/10 23:35
Joined: Jul 2009
Posts: 1,198
Berlin, Germany
L
Liamissimo Offline OP
Serious User
Liamissimo  Offline OP
Serious User
L

Joined: Jul 2009
Posts: 1,198
Berlin, Germany
Hey,

I just want to check if a word is in a txt file. This code gives me an Invalid Pointer... It should just check valid.txt for the word "did" and if it is found to nothing and if not write it in and go to google
Code:
var survey_var = file_open_write("valid.txt");
STRING* survey_string = "";
function survey()
{
	file_str_read(survey_var,survey_string);
	if(!str_cmpi(survey_string,"did"))
	{
		file_str_write(survey_var,"did");
		exec("www.google.de",NULL);
	}
	file_close(survey_var);
}




"Ich weiss nicht genau, was Sie vorhaben, aber Sie können keine Triggerzonen durch Ihr Level kullern lassen."
-JCL, 2011
Re: Check a txt file [Re: Liamissimo] #343696
10/09/10 01:12
10/09/10 01:12
Joined: Sep 2003
Posts: 5,900
Bielefeld, Germany
Pappenheimer Offline
Senior Expert
Pappenheimer  Offline
Senior Expert

Joined: Sep 2003
Posts: 5,900
Bielefeld, Germany
You have to put "survey_var = file_open_write("valid.txt");" into the function.

Re: Check a txt file [Re: Pappenheimer] #343701
10/09/10 06:18
10/09/10 06:18
Joined: Jul 2009
Posts: 1,198
Berlin, Germany
L
Liamissimo Offline OP
Serious User
Liamissimo  Offline OP
Serious User
L

Joined: Jul 2009
Posts: 1,198
Berlin, Germany
Thanks, it's working now laugh


"Ich weiss nicht genau, was Sie vorhaben, aber Sie können keine Triggerzonen durch Ihr Level kullern lassen."
-JCL, 2011

Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1