Warning...
#2

Quote:
Originally Posted by Smokkr
Посмотреть сообщение
Ok. here's one code for reading .txt files in-game:
pawn Код:
CMD:read(playerid,params[])
{
    new tmp[60],store[256],string[158];
    if (sscanf(params, "s[60]",tmp)) return SendClientMessage(playerid, -1, "Usage: /Read TextFile (include .txt)");
    new File:file = fopen(tmp,io_read);
    while(fread(file,store))
    {
        format(string,sizeof(string),"%s",file); //problem line - 277
        SendClientMessage(playerid,-1,string);
    }
    return 1;
}
So on that line 277 (the problem line) shows a warning: C:\Users\*****\Desktop\Untitled.pwn(277) : warning 213: tag mismatch
where is the problem??
Try this:
Код:
CMD:read(playerid,params[])
{
    new tmp[60],store[256],string[158];
    if (sscanf(params, "s[60]",tmp)) return SendClientMessage(playerid, -1, "Usage: /Read TextFile (include .txt)");
    new file:file = fopen(tmp,io_read);
    while(fread(file,store))
    {
        format(string,sizeof(string),"%s",file); //problem line - 277
        SendClientMessage(playerid,-1,string);
    }
    return 1;
}
Reply


Messages In This Thread
Warning... - by Smokkr - 18.01.2014, 22:06
Re: Warning... - by gtascripterultimate - 19.01.2014, 12:59

Forum Jump:


Users browsing this thread: 1 Guest(s)