Mike's Cops and Robbers

Community => Bug Reports => Fixed Bugs => Topic started by: x4x on December 14, 2023, 10:48:56 pm

Title: Trucking destination bug
Post by: x4x on December 14, 2023, 10:48:56 pm
- What was the script version?
(https://i.ibb.co/d0bP4rC/Untitled.png)

- Your in-game name (we may credit bug reporters with in-game cash if it's a major or exploitable issue)
Niovie

- What happened? Please give as many details as you can. Even if you think it's irrelevant it might be just the piece of information we need to pin point the issue.
    - Where were you?
    - What were you doing?
    - Did you have some sort of special circumstances happening at the time?


Sometimes there's a possibility that when trucking, the destination from where the stuff needs picking up will be the same as the destination where it needs to be left off.
I am not sure if this is a coincidence but this happened the next trucking after delivering the special cargo.

- Is this a reoccurring issue? Has it happened to you or others before?
Yes, it happened to me before as well but rarely.

- Please provide steps for us to reproduce the issue ourselves, if possible.
Go trucking and check for the destinations.

- Images and videos help a LOT. Press F8 in-game to take a screenshot and upload it here for us to see the issue for ourselves. Please crop/resize large images.


- Date and time of incident if known
Right now
Title: Re: Trucking destination bug
Post by: Jay_Dee on December 14, 2023, 11:31:21 pm
Thankyou for the report. this will be investigated. Congrats on the easiest mission ever :)
Title: Re: Trucking destination bug
Post by: Ralsei on December 15, 2023, 07:29:49 am
This happens ever since the tucking update, not a bug just bad luck.
Title: Re: Trucking destination bug
Post by: Ardealul on December 15, 2023, 09:01:20 am
This happens ever since the tucking update, not a bug just bad luck.
How is this not a bug? while(to==from){to=random(listOfDestinations)}
Title: Re: Trucking destination bug
Post by: overdoz on December 15, 2023, 10:46:40 am
This happens ever since the tucking update, not a bug just bad luck.

How is this not a bug? while(to==from){to=random(listOfDestinations)}

It is indeed a bug and requires plenty of hours of testing. Will investigate this further.
Title: Re: Trucking destination bug
Post by: Ardealul on December 15, 2023, 01:51:04 pm
Hi Niovie. Thanks for bringing this issue to our attention. I have logged the issue and will inform you of an update when it's available. You can find the information relating to the logged issue below.
Bug report by Niovie(forum topic #18953 (http://mikescnr.com/forum/index.php/topic,18953.0.html))
Issue #3576 (https://github.com/mikescnr/mcnr-issues/issues/3576)
IssueFrom&To in trucking can both be the same place
DescriptionFrom time to time, the from and to when starting a trucking mission can be the same place.
Script areaIdk
PriorityMedium
Logged byArdealul (http://mikescnr.com/forum/index.php?action=profile;u=4337)
Assigned toMike (http://mikescnr.com/forum/index.php?action=profile;u=1)
StatusNew
Title: Re: Trucking destination bug
Post by: Ardealul on December 15, 2023, 01:51:23 pm
Moved to Confirmed Bugs.
Title: Re: Trucking destination bug
Post by: x4x on December 15, 2023, 02:35:58 pm
How is this not a bug? while(to==from){to=random(listOfDestinations)}

@Ardealul Make the entire functionality recursive or remove from the array the 'from' element and extract a 'to' from there. :D
Title: Re: Trucking destination bug
Post by: Ardealul on December 15, 2023, 02:46:46 pm
@Ardealul Make the entire functionality recursive or remove from the array the 'from' element and extract a 'to' from there. :D

Removing it will use more memory because you need to clone the array if it's in a function not a global var. While is the best cause it only gets executed if the condition is met anyways