• DarkRP Negative Money
    6 replies, posted
[Move This Thread To The Proper Location Please] DarkRP 2.6 I've been having this issue recently where everytime someone purchases a weapon or shipment (Doesn't happen when purchasing entity) on my server, if they do not have the money required to purchase the weapon/ship, it will spawn the weapon/ship and send the player into negative money. I don't recall changing anything that would affect this. Is there a way I can just prevent the money from going in to the negative?
Does it still happen without the DarkRP modification addon installed?
[QUOTE=ph:lxyz;49136415]Does it still happen without the DarkRP modification addon installed?[/QUOTE] I'll have an answer to that as soon as I get home. [editline]18th November 2015[/editline] [QUOTE=ph:lxyz;49136415]Does it still happen without the DarkRP modification addon installed?[/QUOTE] It doesn't happen when it is removed, so it must be something I did. [editline]18th November 2015[/editline] Anyone have an idea to what might have caused this, what would I have to have changed to affect such a thing?
[QUOTE=dannyf127;49136425]I'll have an answer to that as soon as I get home. [editline]18th November 2015[/editline] It doesn't happen when it is removed, so it must be something I did. [editline]18th November 2015[/editline] Anyone have an idea to what might have caused this, what would I have to have changed to affect such a thing?[/QUOTE] Just check your modifications; we don't know what you did.
[QUOTE=code_gs;49136923]Just check your modifications; we don't know what you did.[/QUOTE] I literally haven't changed anything. I've only added jobs, shipments, and entities. I've changed a few settings, but I'm not which setting would throw the damn thing into negative money.
Now try it with the DarkRP Modification addon, but without any of your changes there - take a back up your existing modification addon first obviously. If you still see the negative money problem happen when you're using the now-unedited modification addon installed, then the problem is triggered by the addon itself. If it [i]doesn't[/i] have the issue, then you have the proof that something you did is having the side effect of messing things up (whether what you did was an actual Lua error or not). For example, to expand on the last point - DarkRP might be expecting a number value for a price and it instead sees a string. Once the various calculations are done and if statements are run, they could run in a different way to the way FPtje had intended them to based upon the fact it's a string rather than a number, resulting in negative money being allowed as a side-effect. That's probably not the reason but it will be something like that - that is to say; if it's not just a missing bracket. While I'm on the subject, check for lua errors. Make sure that you look at the VERY FIRST lua error that shows up, because any that appear after that could also be a side effect of the first error.
likely you forgot a "can afford" check before doing said action and taking the players money
Sorry, you need to Log In to post a reply to this thread.