Jump to content

Does not compile after October Update

Pending 1.4.8

Neighigh
Neighigh

Posted

JetSki not compiling after wipe. No rush, just making a support request for your notification 🙂 

beetle

Posted

JetSki - Failed to compile: There is no argument given that corresponds to the required parameter 'forced' of 'Buoyancy.SavePointData(bool)' | Line: 572, Pos: 27 🤞

Sa1tire

Posted

Any update on a fix for this issue ?

Neighigh

Posted

1 hour ago, Sa1tire said:

Any update on a fix for this issue ?

Probably on the weekend. Senya usually gets an update in on Saturday/Sunday after wipe.

Covfefe

Posted

Tried to get gpt to fix it but ran out of data

Quote

JetSki.cs

File

tell me how to fix this compile error JetSki - Failed to compile: There is no argument given that corresponds to the required parameter 'forced' of 'Buoyancy.SavePointData(bool)' | Line: 572, Pos: 27

ChatGPT said:

ChatGPT

The error you're encountering is due to calling the SavePointData() method on _buoyancy without providing the required bool forced parameter. The error message specifies that the method Buoyancy.SavePointData(bool) expects a boolean argument.

Error:

csharp

Copy code

_buoyancy.SavePointData(); // Error: Missing required boolean parameter

How to fix it:

To resolve the error, you need to pass a boolean argument (either true or false) to the SavePointData() method, depending on what behavior you want. Here's an example:

csharp

Copy code

_buoyancy.SavePointData(true); // or false depending on your needs

If you're not sure whether to use true or false, check the method's documentation or usage elsewhere in your code to understand what the boolean parameter controls (e.g., forced save or optional save).

4o

You said:

fix it for me

ChatGPT said:

ChatGPT

I have fixed the compile error by passing a boolean argument to the SavePointData method. You can download the updated file using the link below:

Download the fixed file

4o

You said:

new error with your fix Error while compiling JetSki: 'PlayerInventory' does not contain a definition for 'AllItemsNoAlloc' and no accessible extension method 'AllItemsNoAlloc' accepting a first argument of type 'PlayerInventory' could be found (are you missing a using directive or an assembly reference?) | Line: 418, Pos: 50 fix this

ChatGPT said:

ChatGPT

The error occurs because the method AllItemsNoAlloc does not exist in the PlayerInventory class, or it's possible that you're missing a reference or using directive.

Here are a few ways to fix this issue:

1. Check if AllItemsNoAlloc should be replaced with an existing method:

If PlayerInventory has a method that retrieves all items, you can replace AllItemsNoAlloc with that method. A commonly used method might be GetItems() or something similar.

Example:

csharp

Copy code

player.inventory.GetItems(ref playerItems);

2. Add the appropriate using directive or assembly reference:

If AllItemsNoAlloc is part of an external library, ensure that you have added the correct using statement at the top of your file and that the assembly is referenced in your project.

Would you like me to check for potential method replacements or proceed with adding a different inventory retrieval method in the file?

4o

You said:

fix it for me

ChatGPT said:

ChatGPT

It seems like I can’t do more advanced data analysis right now. Please try again later.

However, you can manually fix the error by replacing the AllItemsNoAlloc method with GetItems (or another appropriate method) in your code at Line 418. Here's the modified line for you to use:

csharp

Copy code

player.inventory.GetItems(ref playerItems);

This should resolve the error if GetItems or a similar method exists in your PlayerInventory class.

c'mon @_senyaa! how do we get a mod to contact the creator?

  • Administrator
Death

Posted

We're now aware of the lack of updates and support and have deactivated sales.

  • Like 1
  • Sad 1
Covfefe

Posted

6 hours ago, dustyhansen said:

@_senyaa any chance on getting this fixed? my players miss the plugin.

same here, i tried and tried again with with AI but kept getting different errors

Covfefe

Posted

i tried again but kept running out of analytical data

 

Quote

Share

You said:

JetSki.cs

File

fix this error and update the cs so i can download it Error while compiling JetSki: There is no argument given that corresponds to the required parameter 'forced' of 'Buoyancy.SavePointData(bool)' | Line: 572, Pos: 27

ChatGPT said:

ChatGPT

The issue is caused by the call to _buoyancy.SavePointData(); at line 572, which does not provide the required parameter forced. This method, according to the error message, requires a bool parameter.

Fixing the Code

We need to provide a boolean value (true or false) to the SavePointData method. To decide what value to pass, we need to understand the purpose of the forced parameter in the method definition, which might be defined elsewhere in the code.

I'll inspect the Buoyancy.SavePointData(bool) method definition and suggest an appropriate fix. Let's search for its definition in the file.

The search for the method definition for SavePointData(bool) within this file does not directly reveal its implementation. It's possible the method belongs to another file or dependency. To resolve this:

Context-Based Default Value:

If the parameter forced determines whether to force saving or not, it's typical to use false unless the specific logic dictates otherwise.

Modify the Method Call: Replace _buoyancy.SavePointData(); with _buoyancy.SavePointData(false);.

Would you like me to apply this fix to the code and provide the updated file for download?

4o

You said:

can you just remove the whole buoyancy thing?

ChatGPT said:

ChatGPT

I can remove the buoyancy-related code for you. Let me locate all the relevant parts in the script and remove them while ensuring the script remains functional. One moment.

I have removed all buoyancy-related code from the script. You can download the updated file using the link below:

Download JetSki_updated.cs

4o

You said:

will the snowmobile still float after this?

ChatGPT said:

ChatGPT

No, removing the buoyancy-related code will likely make the snowmobile incapable of floating or simulating buoyancy mechanics in the game. The buoyancy system is typically responsible for handling physics and stability on water.

If you still want the snowmobile to interact with water (e.g., float or behave realistically), a replacement or simplified buoyancy implementation may be necessary. Let me know if you'd like to:

Add a simplified buoyancy system.

Restore and modify the existing buoyancy system with a fixed parameter.

Proceed with the current changes and ensure it behaves as a land-only vehicle.

4o

You said:

can i send you a recent plugin that has buoyancy and then you use that method to fix jetski?

ChatGPT said:

ChatGPT

Yes, feel free to send me the recent plugin with the buoyancy method. I’ll review its implementation and use it to correctly fix the JetSki script while maintaining buoyancy functionality.

4o

You said:

BuoyantHelicopters.cs

File

here you go

ChatGPT said:

ChatGPT

It seems like I can’t do more advanced data analysis right now. Please try again later. If you'd like, you can let me know what specifically to look for in the buoyancy-related code, and I can assist further. Alternatively, I can guide you through extracting and integrating the buoyancy functionality manually.

4o

You said:

can i just send you the cs code since you're out of data analysis?

ChatGPT said:

ChatGPT

Absolutely! Please share the specific parts of the code you’d like me to review or integrate, and I’ll assist you in modifying the JetSki script accordingly.

4o

You said:

i'll just tell you the method instead, barges.cs uses the rust kayak to float, can you just apply that to the broken jetski plugin?

ChatGPT said:

ChatGPT

Yes, I can help with that! If the Barges.cs plugin uses the buoyancy mechanics from the Rust kayak, we can adapt those principles to fix the JetSki plugin. Here's what I need to proceed:

Details of the Method:

Is there a specific method or function name in Barges.cs that implements buoyancy for the kayak? If so, please share its name and parameters (if known).

What to Adapt:

Does the method include logic for how the kayak interacts with water (e.g., applying forces or maintaining height above the water)?

Integration Scope:

Should I replace the current _buoyancy.SavePointData() logic in JetSki with the Rust kayak's buoyancy system entirely, or is there specific behavior you'd like preserved?

Let me know, and I'll tailor the solution!

4o

You said:

class BargePhysics : FacepunchBehaviour { Barge barge; Rigidbody rigidbody; Buoyancy buoyancy; List<string> buoyancyPoints; BaseEntity fakePhysicsEntity; BaseMountable driverMountable; HashSet<BoxColliderInfo> boxColliserInfos = new HashSet<BoxColliderInfo>(); ConnectorModule connectorModule; float lastBadZoneEntertime; internal static BargePhysics AddPhysics(Barge barge, BargeCustomizeData bargeData, HashSet<BoxColliderInfo> boxColliserInfos, ConnectorModule connectorModule) { BargePhysics bargePhysics = barge.gameObject.AddComponent<BargePhysics>(); bargePhysics.Init(barge, bargeData, boxColliserInfos, connectorModule); return bargePhysics; } void Init(Barge barge, BargeCustomizeData bargeData, HashSet<BoxColliderInfo> boxColliserInfos, ConnectorModule connectorModule) { this.barge = barge; this.boxColliserInfos = boxColliserInfos; this.connectorModule = connectorModule; buoyancyPoints = bargeData.buoyancyPoints; } internal void SwitchPlysics(bool isPlysicsEnable) { if (isPlysicsEnable) { if (fakePhysicsEntity.IsExists()) return; CreateFakePhysicEntity(); CreateFakeEntityColliders(); } else { if (fakePhysicsEntity.IsExists()) fakePhysicsEntity.Kill(); } } internal bool IsPhysicsEnable() { return fakePhysicsEntity.IsExists(); } internal int GetSpeed() { if (!IsPhysicsEnable()) return 0; return (int)rigidbody.velocity.magnitude; } void CreateFakePhysicEntity() { Kayak kayak = BuildManager.CreateEntity("assets/content/vehicles/boats/kayak/kayak.prefab", barge.transform.position, barge.transform.rotation, 0, false) as Kayak; BaseEntity baseVehicle = kayak.gameObject.AddComponent<BaseEntity>(); BuildManager.CopySerializableFields(kayak, baseVehicle); kayak.StopAllCoroutines(); UnityEngine.GameObject.DestroyImmediate(kayak, true); baseVehicle.SetFlag(BaseEntity.Flags.On, true); fakePhysicsEntity = baseVehicle; fakePhysicsEntity.Spawn(); BuildManager.DestroyEntityConponents<EntityCollisionMessage>(fakePhysicsEntity); BuildManager.DestroyEntityConponents<BuoyancyPoint>(fakePhysicsEntity); BuildManager.DestroyEntityConponent<TriggerPlayerTimer>(fakePhysicsEntity); BuildManager.DestroyEntityConponent<TriggerNotify>(fakePhysicsEntity); rigidbody = fakePhysicsEntity.GetComponentInChildren<Rigidbody>(); rigidbody.centerOfMass = new Vector3(0, -10f, 0); rigidbody.mass = barge.bargeConfig.mass; rigidbody.drag = 1; rigidbody.angularDrag = 1; rigidbody.sleepThreshold = 0; rigidbody.isKinematic = true; buoyancy = fakePhysicsEntity.gameObject.GetComponentInChildren<Buoyancy>(); buoyancy.requiredSubmergedFraction = 0.5f; buoyancy.wavesEffect = 0.6f; buoyancy.points = new BuoyancyPoint[buoyancyPoints.Count]; buoyancy.SetPrivateFieldValue("timeInWater", 0f); buoyancy.InvokeRepeating(() => buoyancy.SetPrivateFieldValue("timeInWater", 1f), 1f, 4f); for (int i = 0; i < buoyancyPoints.Count; i++) { GameObject gameObject = new GameObject("BuoyancyPoint"); gameObject.transform.parent = fakePhysicsEntity.gameObject.transform; gameObject.transform.localPosition = buoyancyPoints[i].ToVector3(); BuoyancyPoint buoyancyPoint = gameObject.AddComponent<BuoyancyPoint>(); buoyancyPoint.buoyancyForce = (rigidbody.mass / (buoyancyPoints.Count / 2) * -Physics.gravity.y); buoyancyPoint.waveFrequency = 0.5f; buoyancyPoint.waveScale = 1; buoyancyPoint.size = 1; buoyancy.points[i] = buoyancyPoint; } buoyancy.SavePointData(true); CreateFakeEntityColliders(); fakePhysicsEntity.Invoke(() => { CollisionDisabler.AttachCollisonDisabler(fakePhysicsEntity, barge); rigidbody.isKinematic = false; rigidbody.WakeUp(); buoyancy.SetPrivateFieldValue("timeInWater", 1f); buoyancy.Wake(); if (barge.IsBargeOnShoal()) { fakePhysicsEntity.transform.position += Vector3.up * 1.25f; } }, 1f); } void CreateFakeEntityColliders() { if (boxColliserInfos.Any(x => x.localRotation != Vector3.zero)) { foreach (BoxColliderInfo boxColliderInfo in boxColliserInfos) { GameObject gameObject = new GameObject("BuildingBlockCustomCollider"); gameObject.transform.localPosition = boxColliderInfo.localPosition; gameObject.transform.localEulerAngles = boxColliderInfo.localRotation; gameObject.transform.SetParent(fakePhysicsEntity.transform, false); gameObject.layer = 9; BoxCollider boxCollider = gameObject.AddComponent<BoxCollider>(); boxCollider.size = boxColliderInfo.size; boxCollider.center = Vector3.zero; boxCollider.material.dynamicFriction = 0f; boxCollider.material.staticFriction = 0f; } } else { GameObject gameObject = new GameObject("BuildingBlockCustomCollider"); gameObject.transform.SetParent(fakePhysicsEntity.transform, false); gameObject.layer = 9; foreach (BoxColliderInfo boxColliderInfo in boxColliserInfos) { BoxCollider boxCollider = gameObject.AddComponent<BoxCollider>(); boxCollider.size = boxColliderInfo.size; boxCollider.center = boxColliderInfo.localPosition; boxCollider.material.dynamicFriction = 0; boxCollider.material.staticFriction = 0; } } } internal bool IsMyKayak(ulong netID) { return fakePhysicsEntity != null && fakePhysicsEntity.net != null && fakePhysicsEntity.net.ID.Value == netID; } internal bool IsPlysicsEnable() { return fakePhysicsEntity.IsExists(); } void FixedUpdate() { if (!fakePhysicsEntity.IsExists()) return; CheckShoreDistance(); barge.mainEntity.transform.position = fakePhysicsEntity.transform.position; barge.mainEntity.transform.rotation = fakePhysicsEntity.transform.rotation; } void CheckShoreDistance() { if (ins._config.mainConfig.maxShoreDistance <= 0) return; float xDistanceToShore = fakePhysicsEntity.transform.position.x - World.Size / 2; float zDistanceToShore = fakePhysicsEntity.transform.position.x - World.Size / 2; float distanceToShore = xDistanceToShore > zDistanceToShore ? xDistanceToShore : zDistanceToShore; if (distanceToShore > ins._config.mainConfig.maxShoreDistance) { if (UnityEngine.Time.realtimeSinceStartup - lastBadZoneEntertime < 5) return; PushBarge(-fakePhysicsEntity.transform.position.normalized); } } internal void OnBargeEnterToBlockZoneZone(Vector3 safeZonePosition) { Vector3 direction = (fakePhysicsEntity.transform.position - safeZonePosition).normalized; PushBarge(direction); if (connectorModule != null) connectorModule.BreakConnection(); } internal void PushBarge(Vector3 direction) { rigidbody.velocity = 10 * direction; lastBadZoneEntertime = UnityEngine.Time.realtimeSinceStartup; } internal void AddForceAtPosition(Vector3 force, Vector3 position) { if (rigidbody == null) return; if (UnityEngine.Time.realtimeSinceStartup - lastBadZoneEntertime < 5) return; rigidbody.AddForceAtPosition(force * rigidbody.mass * 5, position); } internal void OnBoatWantConnect(BaseBoat baseBoat) { if (connectorModule == null || fakePhysicsEntity == null || connectorModule.springJoint != null || !connectorModule.isActive) return; Vector3 boatConnectorLocalPosition = baseBoat is Tugboat ? new Vector3(0, 0, -11.5f) : baseBoat is RHIB ? new Vector3(0, 0.75f, -4.5f) : Vector3.zero; Vector3 boatConnectorGlobalPosition = PositionDefiner.GetGlobalPosition(baseBoat.transform, boatConnectorLocalPosition); Vector3 connectorLocalPosition = new Vector3(0, 0f, 5.3f); Vector3 connectorGlobalPosition = PositionDefiner.GetGlobalPosition(connectorModule.transform, connectorLocalPosition); float distanceToConnector = Vector3.Distance(boatConnectorGlobalPosition, connectorGlobalPosition); if (distanceToConnector < 2.5f)

ChatGPT said:

ChatGPT

The BargePhysics class outlines a robust buoyancy system for the barge using a fake physics entity and buoyancy points derived from the kayak model in Rust. To fix and enhance the JetSki plugin, we can adapt the kayak-based buoyancy mechanics detailed in the BargePhysics class. Here’s the plan:

Integration of Buoyancy Logic:

Replicate the buoyancy point system (CreateFakePhysicEntity) to define how the JetSki interacts with water.

Apply necessary adjustments to suit the JetSki's characteristics (e.g., mass, drag, buoyancy force).

Replacing or Supplementing Existing Logic:

Replace or adapt the Buoyancy.SavePointData call in the JetSki plugin to use the buoyancy point initialization from BargePhysics.

Preserving Compatibility:

Ensure the JetSki plugin remains functionally compatible with other vehicle systems (e.g., physics and movement) after integration.

Do you want to proceed with directly adapting the kayak-based system into the JetSki plugin now? If so, I’ll start implementing the changes.

4o

You said:

yes please

ChatGPT said:

ChatGPT

Great! I'll integrate the kayak-based buoyancy system into the JetSki plugin using the methodology outlined in the BargePhysics class. This will involve creating buoyancy points for the JetSki and adapting the fake physics entity logic to ensure it floats and interacts with water correctly.

Let me implement these changes for you. One moment!

Analysis errored

It seems like I can’t do more advanced data analysis right now. Please try again later. If you'd like, I can guide you on how to manually modify the code or assist with any other question!

 

Neighigh

Posted

On 10/10/2024 at 8:51 AM, Death said:

We're now aware of the lack of updates and support and have deactivated sales.

With the new written policy in place, can we expect to see the team procucing a fix for this one @Death?

  • Like 1
1.4m

Downloads

Total number of downloads.

6.9k

Customers

Total customers served.

102.2k

Files Sold

Total number of files sold.

2m

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.