komjj Posted June 13, 2009 Author Share Posted June 13, 2009 Is it possible to make eclipse export the current list of items in the players inventory in a format that another program can read? Link to comment Share on other sites More sharing options...
Robin Posted June 13, 2009 Share Posted June 13, 2009 You're wanting to print it out in text format?Something like this?Item1: NothingItem2: [itemname] x[value]etc.? Link to comment Share on other sites More sharing options...
komjj Posted June 13, 2009 Author Share Posted June 13, 2009 yeah something like that Link to comment Share on other sites More sharing options...
anasky Posted June 14, 2009 Share Posted June 14, 2009 In the source (server) you can call these subs:Call WriteINICall ReadINIOf course, your other program has to be able to read .ini format.Although, you will have to go to Sub TakeItem and Sub GiveItem because you will have to add that, when a player gets or loses an item, the .ini will have to update. Link to comment Share on other sites More sharing options...
Robin Posted June 14, 2009 Share Posted June 14, 2009 INI is a poor way to do it. Just have it save it in plain text.Something like this:```Public Sub ExportInventory()Dim FileName As StringDim F As IntegerDim n as long FileName = App.Path & "\inventory.txt" F = FreeFile Open FileName For Append As #F For n = 1 To MAX_INV Print #F, "Inventory Slot " & n & " Item: " & Item(GetPlayerInvItemNum(Index, n)).Name & " x" & GetPlayerInvItemValue(Index, n) Next Close #F End IfEnd Sub``` Link to comment Share on other sites More sharing options...
komjj Posted June 14, 2009 Author Share Posted June 14, 2009 thanks i'll try that 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