Warning...
#1

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??
Reply
#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


Forum Jump:


Users browsing this thread: 1 Guest(s)