fwrite help
#1

Hi im trying to make a system that i type /leaveanote [TEXT HERE]. And it will save what you have type into a .txt but i get 1 error here is my command:

Код:
	if(strcmp(cmd, "/leaveanote", true) == 0)
	{
	    if(IsPlayerConnected(playerid))
	    {
	        if(PlayerInfo[playerid][pAdmin] >= 1337)
			{
				tmp = strtok(cmdtext, idx);
				if(!strlen(tmp))
				{
					SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /leaveanote [Note(TEXT)]");
					return 1;
				}
				new note;
				note = strvalEx(tmp);
				{
					new File:log = fopen("/adminnotes.txt", io_write);
				    fwrite(log, note);// this is line 27006 the line with the error
    				fclose(log);
					format(string, sizeof(string), "   You have left the note %s", note);
					SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
				}
			}
		}
		return 1;
	}
and here is my error:
Код:
C:\Users\Ryan\Desktop\World Wide RolePlay\gamemodes\WWRP.pwn(27006) : error 035: argument type mismatch (argument 2)
Reply


Messages In This Thread
fwrite help - by yarrum3 - 17.01.2011, 23:26
Re: fwrite help - by Jefff - 18.01.2011, 00:44
Re: fwrite help - by yarrum3 - 18.01.2011, 01:46
Re: fwrite help - by Grim_ - 18.01.2011, 02:21
Re: fwrite help - by yarrum3 - 18.01.2011, 05:31
Re: fwrite help - by Grim_ - 18.01.2011, 05:53

Forum Jump:


Users browsing this thread: 1 Guest(s)