Average-Org / SimpleEcon

A simple, light-weight economy TShock V5 plugin that can also be utilized by other plugins. No bullshit dependecies!
5 stars 0 forks source link

Cant use Resetbal #1

Open Op0m opened 1 year ago

Op0m commented 1 year ago

So i find some Glitch where i cant use These command.everytime i use it is said "Command Failed" and after got that error i check the log and find this:

2022-12-19 03:44:14 - Utils: INFO: Redigit executed: /resetbal 10. 2022-12-19 03:44:14 - Command: ERROR: System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection. (Parameter 'index') at System.Collections.Generic.List1.get_Item(Int32 index) at SimpleEcon.SimpleEcon.ResetBal(CommandArgs args) at TShockAPI.Command.Run(String msg, Boolean silent, TSPlayer ply, List1 parms)

Op0m commented 1 year ago

Oh yeah i forget if i want to reset my alt balance to 0

RenderBr commented 1 year ago

Oh yeah i forget if i want to reset my alt balance to 0

Consider using this much better plugin: https://github.com/Terraria-Builders-Community/Banker

It is a full rewrite by me, however the only downside is you need a mongodb setup to use it since it depends on Auxiliary (by TBC). It also depends on CSF.Net.TShock. However, it is worth it if you want a better economy plugin and also more frequent updates.

As for this plugin, I will get around to fixing this issue.

RenderBr commented 1 year ago

Oh yeah i forget if i want to reset my alt balance to 0

Oh, just realized what's wrong here. You don't /resetbal 10. ???? /setbal 10 is how you set a specific currency. /resetbal is how you reset a player's balance to 0.

That is why it is throwing an error. LOL

Op0m commented 1 year ago

Oh yeah i forget if i want to reset my alt balance to 0

Consider using this much better plugin: https://github.com/Terraria-Builders-Community/Banker

It is a full rewrite by me, however the only downside is you need a mongodb setup to use it since it depends on Auxiliary (by TBC). It also depends on CSF.Net.TShock. However, it is worth it if you want a better economy plugin and also more frequent updates.

As for this plugin, I will get around to fixing this issue.

Ok but how connect Database to server? i dont know how to use database (still newbie on Database)

Op0m commented 1 year ago

Oh yeah i forget if i want to reset my alt balance to 0

Oh, just realized what's wrong here. You don't /resetbal 10. ???? /setbal 10 is how you set a specific currency. /resetbal is how you reset a player's balance to 0.

That is why it is throwing an error. LOL

Oh i think i know why (just my theory): the Code think 0 its negative number but actually 0 is a positive number

RenderBr commented 1 year ago

Oh yeah i forget if i want to reset my alt balance to 0

Oh, just realized what's wrong here. You don't /resetbal 10. ???? /setbal 10 is how you set a specific currency. /resetbal is how you reset a player's balance to 0.

That is why it is throwing an error. LOL

Oh i think i know why (just my theory): the Code think 0 its negative number but actually 0 is a positive number

no? if your inputting 10 that is completely false

RenderBr commented 1 year ago

Oh yeah i forget if i want to reset my alt balance to 0

Oh, just realized what's wrong here. You don't /resetbal 10. ???? /setbal 10 is how you set a specific currency. /resetbal is how you reset a player's balance to 0.

That is why it is throwing an error. LOL

Oh i think i know why (just my theory): the Code think 0 its negative number but actually 0 is a positive number

no? if your inputting 10 that is completely false