Jump to content

Error When Buying Command

Closed 1.2.6

dustyhansen
dustyhansen

Posted

I am getting the following error when a player buys a Quarry Computer from the shop. The command is "gq {userId}" and it works just fine when I type the command in the console, but when Shoppy Stock issues the command we get the error.

Failed executing console command 'gq' in 'Quarry Computer v1.4.1 by Marte6' [callback] (Object reference not set to an instance of an object)
at void Oxide.Plugins.QuarryComputer.GiveQuarryCommandCmd(Arg arg) in /home/container/carbon/plugins/QuarryComputer.cs:line 1277
at object System.Reflection.RuntimeMethodInfo.Invoke(object obj, BindingFlags invokeAttr, Binder binder, object[] parameters, CultureInfo culture)
01/16 18:53:36 | [ShoppyStock] Player Milfred (76561198328184183) purchased x1 Quarry Computer for 15k SCRAP.

Here is the Quarry Computer plugin from here that I am using. The developer can't reproduce this with his shop plugin:

 

ThePitereq

Posted (edited)

3 hours ago, dustyhansen said:

I am getting the following error when a player buys a Quarry Computer from the shop. The command is "gq {userId}" and it works just fine when I type the command in the console, but when Shoppy Stock issues the command we get the error.

Failed executing console command 'gq' in 'Quarry Computer v1.4.1 by Marte6' [callback] (Object reference not set to an instance of an object)
at void Oxide.Plugins.QuarryComputer.GiveQuarryCommandCmd(Arg arg) in /home/container/carbon/plugins/QuarryComputer.cs:line 1277
at object System.Reflection.RuntimeMethodInfo.Invoke(object obj, BindingFlags invokeAttr, Binder binder, object[] parameters, CultureInfo culture)
01/16 18:53:36 | [ShoppyStock] Player Milfred (76561198328184183) purchased x1 Quarry Computer for 15k SCRAP.

Here is the Quarry Computer plugin from here that I am using. The developer can't reproduce this with his shop plugin:

 

Hey, idk why it doesnt work for you, i have multiple commands with userId and they do work.

Edited by ThePitereq
dustyhansen

Posted

4 hours ago, ThePitereq said:

Hey, idk why it doesnt work for you, i have multiple commands with userId and they do work.

So do I, but this one is a problem. Does this look correct to you?

      "quarry-0": {
        "Command (if set, ignore item)": [
          "gq {userId}"
        ],
        "Shortname": "",
        "Skin ID": 15,
        "Amount": 1,
        "Item Name": "",
        "Display Name": "Quarry Computer",
        "Is Blueprint": false,
        "Icon URL (if skin not 0)": "https://alliant.nyc3.cdn.digitaloceanspaces.com/ShoppyStock/ShopItems/98%20-%207s1zxub.png",
        "Price": 15000,
        "Price Per Purchase Multiplier": 1.0,
        "Multiply Price Per Daily (true) Or Per Wipe (false) Purchases": true,
        "Show Description Field": true,
        "Discount Permission (value)": {},
        "Required Permission": "shoppystock.vip2",
        "Display Blacklist Permission": "",
        "Daily Buy Max": 0,
        "Wipe Buy Max": 2,
        "Cooldown Between Purchases (in seconds, 0 to disable)": 0
      }

Here is the other ticket I have: https://codefling.com/files/support/18497-quarry-limit/

ThePitereq

Posted

seems okay, you can also try loading some kind of logger onto server and see if the console command is sent correctly. Loger from umod should do the work

dustyhansen

Posted

On 1/22/2025 at 5:05 AM, ThePitereq said:

seems okay, you can also try loading some kind of logger onto server and see if the console command is sent correctly. Loger from umod should do the work

he said to give you this info, does this help at all?

This is the part of the code you can send to the other dev:
[ConsoleCommand("gq")]
 private void GiveQuarryCommandCmd(ConsoleSystem.Arg arg)

 

ThePitereq

Posted

On 1/29/2025 at 4:14 PM, dustyhansen said:

he said to give you this info, does this help at all?

This is the part of the code you can send to the other dev:
[ConsoleCommand("gq")]
 private void GiveQuarryCommandCmd(ConsoleSystem.Arg arg)

 

It says nothing. I need to see what command is being sent, without that i can't help as idk what's wrong, maybe somehow the argument is badly interpretered somehow and it causes problems. without full command viev cant do a lot.

dustyhansen

Posted

On 1/22/2025 at 5:05 AM, ThePitereq said:

seems okay, you can also try loading some kind of logger onto server and see if the console command is sent correctly. Loger from umod should do the work

I installed Logger and purchased a quarry through Shoppy Stock, but it did not capture the command.

Here is what the console shows:

Failed executing console command 'gq' in 'Quarry Computer v1.4.1 by Marte6' [callback] (Object reference not set to an instance of an object)
   at void Oxide.Plugins.QuarryComputer.GiveQuarryCommandCmd(Arg arg) in /home/container/carbon/plugins/QuarryComputer.cs:line 1277
   at object System.Reflection.RuntimeMethodInfo.Invoke(object obj, BindingFlags invokeAttr, Binder binder, object[] parameters, CultureInfo culture)
[ShoppyStock] Player dusty.live (76561198200161362) purchased x1 Quarry Computer for 15k SCRAP.

Here is what logger shows:

[2025-02-01 17:00:25] [02/01/2025 17:00:25] dusty.live (76561198200161362) ran command: chat.teamsay "/shop"
[2025-02-01 17:00:25] [02/01/2025 17:00:25] dusty.live (76561198200161362) ran command: shop 

When I run the command manually it also does not capture it in Logger.

ThePitereq

Posted

On 2/1/2025 at 6:06 PM, dustyhansen said:

I installed Logger and purchased a quarry through Shoppy Stock, but it did not capture the command.

Here is what the console shows:

Failed executing console command 'gq' in 'Quarry Computer v1.4.1 by Marte6' [callback] (Object reference not set to an instance of an object)
   at void Oxide.Plugins.QuarryComputer.GiveQuarryCommandCmd(Arg arg) in /home/container/carbon/plugins/QuarryComputer.cs:line 1277
   at object System.Reflection.RuntimeMethodInfo.Invoke(object obj, BindingFlags invokeAttr, Binder binder, object[] parameters, CultureInfo culture)
[ShoppyStock] Player dusty.live (76561198200161362) purchased x1 Quarry Computer for 15k SCRAP.

Here is what logger shows:

[2025-02-01 17:00:25] [02/01/2025 17:00:25] dusty.live (76561198200161362) ran command: chat.teamsay "/shop"
[2025-02-01 17:00:25] [02/01/2025 17:00:25] dusty.live (76561198200161362) ran command: shop 

When I run the command manually it also does not capture it in Logger.

make sure you log console commands, as they are ran as console command.

dustyhansen

Posted

9 hours ago, ThePitereq said:

make sure you log console commands, as they are ran as console command.

{
  "Log chat messages (true/false)": true,
  "Log command usage (true/false)": true,
  "Log player connections (true/false)": true,
  "Log player disconnections (true/false)": true,
  "Log player respawns (true/false)": true,
  "Log when crafting started (true/false)": true,
  "Log when crafting cancelled (true/false)": true,
  "Log when crafting finished (true/false)": true,
  "Log items dropped by players (true/false)": true,
  "Log output to console (true/false)": false,
  "Rotate logs daily (true/false)": true,
  "Command list (full or short commands)": [],
  "Command list type (blacklist or whitelist)": "blacklist"
}

 

ThePitereq

Posted

contact me through discord, i'll send you some test plugins so we make sure it's working correctly

dustyhansen

Posted

20 hours ago, ThePitereq said:

contact me through discord, i'll send you some test plugins so we make sure it's working correctly

DM sent

1.6m

Downloads

Total number of downloads.

7.7k

Customers

Total customers served.

115.6k

Files Sold

Total number of files sold.

2.4m

Payments Processed

Total payments processed.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.