26.06.2012, 03:57
Example:
format(sring,200,"%s",HERE MUST BE THIS ARGUMENT);
How?
format(sring,200,"%s",HERE MUST BE THIS ARGUMENT);
How?
FileGet(Filename[],const Format[],{Argument}:...) { if(!fexist(Filename)) return 0; new File:Handle = fopen(Filename,io_read); new String[150]; fread(Handle,String); for(new X = 1; X < numargs(); X++) { new Arguments = Argument:getarg(X); sscanf(String,Format,Arguments); } fclose(Handle); return 1; }
C:\Documents and Settings\user\Pulpit\Serwer\filterscripts\Truck.pwn(7) : warning 213: tag mismatch C:\Documents and Settings\user\Pulpit\Serwer\filterscripts\Truck.pwn(52) : warning 213: tag mismatch
public OnFilterScriptInit() { new cos[1]; FileGet("Cos.ini","i i i",cos[0]); return 1; }
FileGet(Filename[], const Format[], ...)
{
if(!fexist(Filename)) return 0;
new File:Handle = fopen(Filename,io_read);
new String[150];
fread(Handle,String);
for(new X = 1; X < numargs(); X++)
{
new Arguments = getarg(X);
sscanf(String, Format, Arguments);
}
fclose(Handle);
return 1;
}