AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   [solved]logging (https://forums.alliedmods.net/showthread.php?t=85135)

Dr.G 02-06-2009 07:40

[solved]logging
 
I do some logging like this:

PHP Code:

  #if LOG_PLAYER_BONUS 
  
new LogFile[128]
  new 
steamid get_user_userid(killer)
 
  
get_datadir(LogFilesizeof LogFile 1)
  
format(LogFilesizeof LogFile 1"%s/dod_combat_bonus/%s"LogFileBONUS_LOG_NAME)
 
  new 
iFile fopen(LogFile"wt+")
  
fprintf(iFile,"[DoD Combat Bonus]%s | STEAMID (%d) | got a godmode bonus!^n"namesteamid)
  
fclose(iFile)
  
#endif 

but as it is, it overwrites the last line it made. How can i get it to write on a new line everytime?

Dr.G 02-06-2009 08:14

Re: logging
 
lol iam so stupid. Needs to be:

Quote:

new iFile = fopen(LogFile, "a+")



All times are GMT -4. The time now is 01:50.

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