AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   why doesnt this work??? (https://forums.alliedmods.net/showthread.php?t=11375)

Sp4rt4n 03-17-2005 16:03

why doesnt this work???
 
this plugin compiles completely fine, but it just wont add the information to the file... any idea why?

Code:
#include <amxmodx> new logdir[32] = "steamid" public client_connect(id){     new authid[17],name[33],IPAddy[33]     get_user_authid(id,authid,16)     get_user_name(id,name,32)     get_user_ip(id,IPAddy,32,1)     new logfile[64]     format(logfile,255,"%s/%s",logdir,authid);     write_file(logfile,name,-1)     write_file(logfile,IPAddy,-1);     return PLUGIN_CONTINUE } public client_infochanged(id){     if (is_user_connected(id)){         new newname[33], oldname[33]         get_user_info(id, "name", newname,32)         get_user_name(id,oldname,32)         if (!equal(oldname,newname)){             new authid[17]             get_user_authid(id,authid,16)             new logfile[64]             format(logfile,255,"%s/%s",logdir,authid);             write_file(logfile,newname,-1);          }     }     return PLUGIN_CONTINUE } public plugin_init(){     register_plugin("steamid_logger","1.0","Sp4rt4n")     return PLUGIN_CONTINUE }

Twilight Suzuka 03-17-2005 17:01

First off, write_file cannot make a new folder, so make sure there is a "steamid" folder.

Second, an authid is NOT a file. You need an ending. Also, your using a hardcoded base, which you shouldnt be using.

Thats just an AWFUL thing to do tbh.


All times are GMT -4. The time now is 14:16.

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