Jump to content

Won't compile

Closed 1.0.3

Somescrub

Posted

I changed the config to spawn only horses {copied directly from your config info}, get the below error message on trying to load the plugin:

 

Failed to initialize plugin 'VehicleSpawner v1.0.3' (ArgumentException: Could not cast or convert from System.String to Oxide.

Plugins.VehicleSpawner+PrefabData.)

  at Newtonsoft.Json.Utilities.ConvertUtils.EnsureTypeAssignable (System.Object value, System.Type initialType, System.Type ta

rgetType) [0x00062] in <271c58b7a8684db5a2c92be17a81f252>:0                                              2kb/s in, 62kb/s out

  at Newtonsoft.Json.Utilities.ConvertUtils.ConvertOrCast (System.Object initialValue, System.Globalization.CultureInfo cultur

e, System.Type targetType) [0x00031] in <271c58b7a8684db5a2c92be17a81f252>:0

  at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.EnsureType (Newtonsoft.Json.JsonReader reader, System.Object v

alue, System.Globalization.CultureInfo culture, Newtonsoft.Json.Serialization.JsonContract contract, System.Type targetType) [

0x0008d] in <271c58b7a8684db5a2c92be17a81f252>:0

  • Moderator
Mals

Posted

Does it compile with no config, letting it generate it?

RIPJAWBONES

Posted (edited)

Hey, we just tested with only the horse and it works fine.

Make sure you download the latest version as it looks like you have 1.0.4 downloaded latest is 1.0.5

Try this config

{
  "MsgSettings": {
    "Message Icon SteamID": "76561197960839785",
    "Message Prefix": "[VehicleSpawner]",
    "Message Prefix Color": "#5af"
  },
  "Prefabs": {
    "Horse": {
      "AutoMount": false,
      "BlockButAllowInBuildingAuthorized": false,
      "BlockButAllowInSafeZone": false,
      "BlockInAuthorizedArea": true,
      "BlockInBuildingBlocked": true,
      "BlockInSafeZone": true,
      "BlockOnLand": false,
      "ChatCommands": [
        "horse",
        "myhorse"
      ],
      "CooldownTimer": 180.0,
      "DisableUIButton": false,
      "FuelAmount": 0,
      "LockFuel": false,
      "Permission": "vehiclespawner.horse",
      "PrefabPath": "assets/rust.ai/nextai/testridablehorse.prefab",
      "Rotation": {
        "x": 0.0,
        "y": 0.0,
        "z": 0.0
      },
      "SkySpawn": false,
      "SkySpawnHeight": 50.0,
      "SpawnDelay": 10.0,
      "SpawnDistance": 5.0,
      "SpawnHeight": 3.0,
      "SpawnOption": 1,
      "UseTracks": false
    }
  },
  "Settings": {
    "AmountOfPrefabsAllowedAtOnce": 2,
    "BlockNearPlayer": {
      "IgnoreTeam": true,
      "PlayerDistance": 5.0,
      "UsePlayerDistance": true
    },
    "DestroyOnDeath": true,
    "DestroyOnDisconnect": true,
    "GlobalSpawnCooldownTimer": 10.0,
    "UseCombatBlocked": true,
    "UseRaidBlocked": true
  },
  "UiPermission": "vehiclespawner.ui",
  "UsePermission": "vehiclespawner.use"
}

 

Edited by RIPJAWBONES
1.5m

Downloads

Total number of downloads.

7k

Customers

Total customers served.

105.3k

Files Sold

Total number of files sold.

2.1m

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.