All pastes #629845 Raw Edit

Stuff

public text v1 · immutable
·published 2007-07-22 18:41 UTC
rendered paste body
	if (!dini_Exists("myfile.ini"))
	{
	    print("\nError: 'myfile.ini' does not exist.  New file created.");
		dini_Create("objects.ini");
	}
	        new File:fwhnd=fopen("myfile.ini",io_read);
	        new tmpres[800];
			new sValue[128];
	        while (fread(fwhnd,tmpres)) {
	           	StripNewLine(tmpres);
	           	new seperator = strfind(tmpres, "=");
				if (seperator) {
					strmid(sValue, tmpres, seperator+1,strlen(tmpres));
					strdel(tmpres,seperator,strlen(tmpres));
					sKey = strval(tmpres);
					if ((!strcmp(tmpres, "Alexw", true)) && (!strcmp(sValue, "Y", true))) {
					    // do this if it finds Alexw=Y
					}
					else {
					    // do this if not
				    }
				}
			}
   			fclose(fwhnd);