[Ajuda] Read and Write
#1

Porque esse code da um erro sendo nativo do samp.

PHP код:
// Open "file.txt" in "read and write" mode
new File:handle fopen("file.txt"),
 
    
// Initialize "buf"
    
buf[128];
 
// Check, if file is open
if(handle)
{
    
// Success
 
    // Read the whole file
    
while(fread(handlebuf)) print(buf);
 
    
// Set the file pointer to the first byte
    
fseek(handle_seek_begin);
 
    
// Write "I just wrote here!" into this file
    
fwrite(handle"I just wrote here!");
 
    
// Close the file
    
fclose(handle);
}
else
{
    
// Error
    
print("The file \"file.txt\" does not exists, or can't be opened.");

Quote:

error 017: undefined symbol "seek_begin"

Reply


Messages In This Thread
Read and Write - by F1N4L - 01.01.2016, 09:42
Re: Read and Write - by Dayvison_ - 01.01.2016, 14:16

Forum Jump:


Users browsing this thread: 1 Guest(s)