Raised This Month: $ Target: $400
 0% 

Auto increment number


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Buckshot
Senior Member
Join Date: Mar 2014
Location: Sweden
Old 04-01-2014 , 10:07   Re: Auto increment number
Reply With Quote #4

Quote:
Originally Posted by Neeeeeeeeeel.- View Post
PHP Code:
write_file("filename.txt""number here"0); 
That does not autoincrement though... that just inserts the number i entered there in the text. If i make +1 every time theres a new entry, this number will reset when the server is restarted. I don't think you read the description fully.. The files entries are gonna be like this, with the correct number every entry, even if the server restarts or not:

Code:
1: Random info
2: More random info
3: Even more random info
4: more..
5: aaand more..
if i would use this method, it could look like this eventually after a few map changes and restarts:

Code:
1: Random info
2: More random info
/* Map changes a while after entry 2 is entered, and this is what happens*/
1: Random info:
2: More random info
......
/* It just starts over from the beginning*/
__________________
PM me for private work.



Last edited by Buckshot; 04-01-2014 at 10:13.
Buckshot is offline
Send a message via Skype™ to Buckshot
 



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 06:02.


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