Raised This Month: $ Target: $400
 0% 

Read FLOAT from file


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Phant
Veteran Member
Join Date: Sep 2009
Location: New Jersey
Old 08-15-2013 , 05:57   Read FLOAT from file
Reply With Quote #1

Hello.
I have simple file with FLOAT number, with AMXX plugin I can read this (I use BLOCK_INT, because there is no BLOCK_FLOAT):
PHP Code:
    new file fopen(map_file"r")
    if (
file) {
        new 
Float:r_origin_x
        fread
(filer_origin_xBLOCK_INT)
        
        
set_task(10.0"task_Announce"r_origin_x)
        
        
fclose(file)
    } 
task_Announce:
PHP Code:
public task_Announce(r_origin_x)
{
    
client_print(0print_chat"READED: %f"r_origin_x)

It's okay:


But, this code is correct? Because I got two warnings in compilation log:
Code:
// file.sma(46) : warning 2
13: tag mismatch
// file.sma(48) : warning 2
13: tag mismatch
46 string:
PHP Code:
fread(filer_origin_xBLOCK_INT
48 string:
PHP Code:
set_task(10.0"task_Announce"r_origin_x
How I can fix this warnings?

Last edited by Phant; 08-15-2013 at 05:58.
Phant is offline
Send a message via ICQ to Phant
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 15:57.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode