-
Posts
86 -
Joined
-
Last visited
Content Type
Profiles
Warranty Claims
Downloads
Forums
Store
Support
DOWNLOADS EXTRA
Services
Everything posted by hc4stillo
-
09/04 15:49:25 | Failed to call hook 'OnServerInitialized' on plugin 'TalkingNpc v1.4.6' (ArgumentNullException: Value cannot be null. Parameter name: source) at System.Globalization.CompareInfo.IndexOf (System.String source, System.String value, System.Globalization.CompareOptions options) [0x00003] in <f98723dd4586469db5213ec59da723ca>:0 at UnityEngine.StringEx.Contains (System.String haystack, System.String needle, System.Globalization.CompareOptions options) [0x0000a] in <a4cad030731741a9afce2404ea192428>:0 at Oxide.Plugins.TalkingNpc+<>c__DisplayClass68_0.<OnServerInitialized>b__0 (MonumentInfo m) [0x00025] in <4a64c536fc81422aa85f2d8f4927101f>:0 at System.Linq.Enumerable+WhereListIterator`1[TSource].MoveNext () [0x00037] in <8b0c76c7efa244bc95eeee75bf1314cd>:0 at Oxide.Plugins.TalkingNpc.OnServerInitialized () [0x00172] in <4a64c536fc81422aa85f2d8f4927101f>:0 at Oxide.Plugins.TalkingNpc.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x013a6] in <4a64c536fc81422aa85f2d8f4927101f>:0 at Oxide.Plugins.CSharpPlugin.InvokeMethod (Oxide.Core.Plugins.HookMethod method, System.Object[] args) [0x00079] in <42f9bedc659b4f4786eb778d3cd58968>:0 at Oxide.Core.Plugins.CSPlugin.OnCallHook (System.String name, System.Object[] args) [0x000de] in <112d89ea5d3348c8b949af0ab1a866d2>:0 at Oxide.Core.Plugins.Plugin.CallHook (System.String hook, System.Object[] args) [0x00060] in <112d89ea5d3348c8b949af0ab1a866d2>:0 After performing different tests, the error is due to the name of the monument that is not recognized as it was in this example: "Monument": "assets/bundled/prefabs/autospawn/monument/small/sphere_tank.prefab", By deleting the monument name the plugin works fine again, but I have a big problem, I don't have time to manually reassign the NPC position in more than 20 monuments. Consulting with ChatGPT the recommendations were these: 1- using System.Globalization; 2- private static bool ContainsCI(string haystack, string needle) { if (string.IsNullOrEmpty(haystack) || string.IsNullOrEmpty(needle)) return false; return CultureInfo.InvariantCulture.CompareInfo.IndexOf( haystack, needle, CompareOptions.IgnoreCase) >= 0; } 3- A private static string GetMonumentName(MonumentInfo monument) { if (monument == null || monument.gameObject == null) return string.Empty; var monumentName = monument.gameObject.name; // Solo verifica el marcador si realmente hay nombre if (!string.IsNullOrEmpty(monumentName) && monumentName.Contains("monument_marker.prefab")) monumentName = monument.gameObject.transform?.parent?.gameObject?.transform?.root?.name; // Siempre regresa string no nulo return monumentName ?? string.Empty; } 3- B GetMonumentName(m).Contains(talkerSpawn.Value.Monument, CompareOptions.IgnoreCase) 3- C foreach (var monument in TerrainMeta.Path.Monuments.Where(m => { if (m == null) return false; var name = GetMonumentName(m); // puede ser "" var target = talkerSpawn.Value?.Monument; // puede ser null o "" return ContainsCI(name, target); })) { if (SpawnTalkingNpc(talkerSpawn.Value, talkerSpawn.Key, monument) != null) SaveTalkerSpawns(); } Here everything worked again, automatically recognizing monuments and NPC positions no matter which map you generate.
-
- 137 comments
-
- #customizablequests
- #dezlife
-
(and 5 more)
Tagged with:
-
- 137 comments
-
- #customizablequests
- #dezlife
-
(and 5 more)
Tagged with:
-
- 137 comments
-
- 1
-
-
- #customizablequests
- #dezlife
-
(and 5 more)
Tagged with:
-
- 91 comments
-
- #rust
- #rust-server
-
(and 4 more)
Tagged with:
-
- 32 comments
-
- 1
-
-
-
-
Lo tienes mal configurado sigue estos pasos: /oxide/data/Shop/Commands.json "regular": { "DisplayName": "REGULAR", "Image": "https://i.ibb.co/j486RD2/250x250.png", "Message": "COMPRASTE EL HELICOPTER NIVEL REGULAR", "Command": "heli.call Regular {steamid}", "BuyPrice": 1500, "Currency": "scrap", "ShowDisplayName": true }, Luego en categoría /oxide/data/Shop/Categories.json "Eventos": { "Image": "https://rustplugins.net/products/shop/box.png", "Permission": null, "Sale": 0.0, "Items": [ "cmd/regular" ] }, Listo debe funcionar sin problemas. Saludos
-
- 137 comments
-
- #customizablequests
- #dezlife
-
(and 5 more)
Tagged with:
-
Problema al intentar levantar del suelo (planter.trinagle.deployed) se cambia en el inventario a (planter.large.deployed). =================================================================================================== Problem when trying to pick up from the ground (planter.trinagle.deployed) is changed in the inventory to (planter.large.deployed).
- 247 comments
-
- #auto plant
- #auto farm
-
(and 5 more)
Tagged with:
-
- 137 comments
-
- 1
-
-
- #customizablequests
- #dezlife
-
(and 5 more)
Tagged with:
-
- 137 comments
-
- 2
-
-
-
- #customizablequests
- #dezlife
-
(and 5 more)
Tagged with:
-
- 1,360 comments
-
- #leveling
- #progression
- (and 19 more)
-
Example: "Tab #1 Settings": { "Enabled": true, "Button Title": " HOME", "Button Icon Img": "you can change icons in data/cuiData.json", "Base Text Size": 12, "Base Text Color": "1 1 1 1", "Text Style": "robotocondensed-bold.ttf", "Text Outline Color": "0 0 0 1", "Text Outline Thickness": "0.5", "Text Align": 0, "Text Lines": [], "Background Image URL": "https://i.imgur.com/codectextetc.png", "Background Image Anchoring": [ "0 0", "1 1" ] }, Version: 3.0.7