Raised This Month: $ Target: $400
 0% 

Read FLOAT from file


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

I want use second (2) solution, it's works for one FLOAT number, but this is does not work with this code:
PHP Code:
new file fopen(map_file"r")
    if (
file) {        
        new 
Float:r_origin[3]        
        
fread(file_:r_origin[0], BLOCK_INT)
        
fread(file_:r_origin[1], BLOCK_INT)
        
fread(file_:r_origin[2], BLOCK_INT)
        
set_task(10.0"task_Announce"_:r_origin[0], _:r_origin[1], _:r_origin[2])        
        
fclose(file)
    } 
PHP Code:
public task_Announce(r_origin_xr_origin_yr_origin_z)
{
    
client_print(0print_chat"X: %f Y: %f Z: %f"Float:r_origin_xFloat:r_origin_yFloat:r_origin_z)

This code crash my CS . What's wrong?
Phant is offline
Send a message via ICQ to Phant
Reply



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