AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Write_file makes an empty line (https://forums.alliedmods.net/showthread.php?t=24886)

Ramono 03-04-2006 08:28

Write_file makes an empty line
 
Code:
#include <amxmodx> new path[62] public plugin_init() {     register_plugin("Writefiletry","1.00","NL)Ramon(NL")     set_task(10.0,"deletefile") } public deletefile(){     new mapname[32]     get_mapname(mapname,31)     format(path,61,"addons/amxmodx/configs/maps/%s.cfg",mapname)     if (file_exists(path))         {         delete_file(path)     }     set_task(0.5,"setfile") } public setfile(){     new x_start[32]     format("x_start",31,"x_start %d",get_cvar_num("x_start"))     write_file(path, x_start,0)         new y_start[32]     format("y_start",31,"y_start %d",get_cvar_num("y_start"))     write_file(path, y_start,1)         new z_start[32]     format("z_start",31,"z_start %d",get_cvar_num("z_start"))     write_file (path, z_start,2) }

It compiles normal, but when i use it it writes an empty line!

Xanimos 03-04-2006 08:33

everything like
Code:
format("x_start",31,"x_start %d",get_cvar_num("x_start"))
should be
Code:
format(x_start,31,"x_start %d",get_cvar_num("x_start"))
(No quotes around variable.)

Ramono 03-04-2006 08:37

Quote:

Originally Posted by Suicid3
everything like
Code:
format("x_start",31,"x_start %d",get_cvar_num("x_start"))
should be
Code:
format(x_start,31,"x_start %d",get_cvar_num("x_start"))
(No quotes around variable.)

Rofl, this kept me buzy like 3 hours....
Thanks, +k (when i can again)


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

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