Raised This Month: $ Target: $400
 0% 

How to update a line in a file & file help.


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
shauli
Member
Join Date: Jun 2018
Old 08-08-2018 , 07:58   Re: How to update a line in a file & file help.
Reply With Quote #2

Log your results to a file (or use amx_log) after the 'parse' native and then look what's wrong and why your strings aren't equal.

Also, some stuff:
1. Use the new file system instead of the old one, it's much better.
2. Move the get_user_authid before the for loop starts, because now your basically calling this native each 'line' and it's the steamid never changes.
3. Remove the get_user_authid inside the 'else if' part
4. You can write 'else' instead of 'else if (!equal..', the conditions are the same.
5. When writing strings to a file (such as SteamIDs), use quotes ("%s"). it will prevent some bugs with the parse function and spaces inside the string.

Last edited by shauli; 08-08-2018 at 07:59.
shauli is offline
 



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 12:13.


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