Help regarding a loop issue.
#2

Yeah I mentioned you might need to re-work some logic now I am looking at it the problem is you are shifting the values in the wrong order. You need to start from the last entry and shift the previous entry.

Example

Код:
for(new x = MAX_POLICECALLS - 1; x > 0; x--)
{
	PoliceCall[x][pol_rl] = PoliceCall[x - 1][pol_rl];
	...
}
If you start at the start of the array then you are going to just copy all the data of the first index to every other index instead of shifting it. This will trash any data in the last index.
Reply


Messages In This Thread
Help regarding a loop issue. - by Dokins - 14.02.2016, 21:49
Re: Help regarding a loop issue. - by Pottus - 14.02.2016, 21:58
Re: Help regarding a loop issue. - by Dokins - 14.02.2016, 22:12
Re: Help regarding a loop issue. - by Pottus - 14.02.2016, 23:08
Re: Help regarding a loop issue. - by Dokins - 15.02.2016, 01:00
Re: Help regarding a loop issue. - by Dokins - 15.02.2016, 01:38
Re: Help regarding a loop issue. - by Dokins - 16.02.2016, 00:41

Forum Jump:


Users browsing this thread: 1 Guest(s)