erkro1 Posted November 4, 2012 Author Share Posted November 4, 2012 This might be a stupid question but I can't figure out how to loop through all players, For i = 1 to MAX_PLAYERS doesn't work because it only loops through all online players.So does someone knows how to do that? Link to comment Share on other sites More sharing options...
tslusny Posted November 4, 2012 Share Posted November 4, 2012 > This might be a stupid question but I can't figure out how to loop through all players, For i = 1 to MAX_PLAYERS doesn't work because it only loops through all online players.> > So does someone knows how to do that?MAX_PLAYERS will work. But 1 to Player_HighIndex wont work, becouse it is loop between online players only. But if you wanna use some variable from offline player, you must use Call LoadPlayer(index,name) Link to comment Share on other sites More sharing options...
Joyce Posted November 4, 2012 Share Posted November 4, 2012 If you mean all the player files, you'll need to open up and load every single one of them separately and change what you need in them. Eclipse only loads in data when the user logs in under the default behavior.The following piece of code might be useful in this case..```strLoad = dir(App.path & "\Data\Accounts\" & "*.*")Do While strLoad > vbNullString ' Do stuff here ' Keep this at the bottom, it resets it to the next file. strLoad = dirLoop```strLoad would be the account filename in this piece of code. Link to comment Share on other sites More sharing options...
Boynaar44 Posted November 4, 2012 Share Posted November 4, 2012 Why so serious?Just put the charlist.txt into an array of accountnames… Link to comment Share on other sites More sharing options...
Joyce Posted November 4, 2012 Share Posted November 4, 2012 charlist.txt is the first useless remnant I remove every time I work on the engine, so I never suggest people to use it. (Not to mention, you'd still be looping through a list just like the code above, so in the end it makes no difference) Link to comment Share on other sites More sharing options...
Boynaar44 Posted November 4, 2012 Share Posted November 4, 2012 Whoo…Making this tutorial made me tired.[http://www.touchofdeathforums.com/community/index.php?/topic/130390-eo20-loop-through-all-players/](http://www.touchofdeathforums.com/community/index.php?/topic/130390-eo20-loop-through-all-players/) Link to comment Share on other sites More sharing options...
erkro1 Posted November 5, 2012 Author Share Posted November 5, 2012 Alright, thanks guys ![:D](http://www.touchofdeathforums.com/community/public/style_emoticons/<#EMO_DIR#>/biggrin.png) Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now