10.09.2012, 12:51
Hi guys, I am pretty much noob at scripting so if you find something really stupid, that's the reason. I really did want to solve this by myself but after two hours I decided to just give up and ask for help. So here I am.
I am using a file management plugin called 'dFile' and I tried to create a stock which will open a specific user file, read a specific line, save and close the file and return the line. I didn't get an error but I do have one warning and the stock doesn't seem to work also;
Any help is appreciated!
I am using a file management plugin called 'dFile' and I tried to create a stock which will open a specific user file, read a specific line, save and close the file and return the line. I didn't get an error but I do have one warning and the stock doesn't seem to work also;
PHP код:
warning 215: expression has no effect
PHP код:
stock GetInfo(targetid, string)
{
new variable[128];
format(variable, 128, "%s.ini", GetName(targetid));
new message[256];
dfile_Open(variable);
message = dfile_ReadString("%s"), string; // The line which gives me the warning.
dfile_SaveFile();
dfile_CloseFile();
return message;
}