Need help with fread.
#1

PHP код:
stock LoadProject(pjname[])
{
    new 
File:handle fopen(pjname,io_read);
    new 
td_Info[128];
    if(
handle)
    {
        while(
fread(handle,td_Info))
        {
             
SendClientMessageToAll(-1,td_Info);
             
printf(td_Info);
        }
    }
}
CMD:te(playerid,params[])
{
    
LoadProject("TD_test.txt");
    return 
1;
    

Reply
#2

Could you explain the problem?
Reply
#3

Quote:
Originally Posted by iLearner
Посмотреть сообщение
Could you explain the problem?
This is not working. Now sending clientmessage.
Reply
#4

fclose not found or file is empty.
Reply
#5

Quote:
Originally Posted by Maheerali
Посмотреть сообщение
This is not working. Now sending clientmessage.
Sorry i got wrong file name
Reply
#6

Quote:
Originally Posted by Maheerali
Посмотреть сообщение
Sorry i got wrong file name
You need to close the file!
Insert fclose(handle); in the end of the function
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)