Bugging - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Bugging (
/showthread.php?tid=513156)
Bugging -
Sanady - 14.05.2014
Hello me again. I have problem with my server I made debug but I still don`t understand bug anyone can help me?
Here is code:
pawn Код:
printf("0");
new RandomZone;
printf("1");
for(new i = 1; i < 5; i++)
{
printf("2");
RandomZone = random(sizeof(GangZones));
printf("3");
while(GangZones[RandomZone][OwnerTeam] != 0)
{
printf("4");
GangZones[RandomZone][OwnerTeam] = i;
}
printf("5");
}
Here is server log of the debug
Код:
[21:04:22] 0
[21:04:22] 1
[21:04:22] 2
[21:04:22] 3
[21:04:22] 5
[21:04:22] 2
[21:04:22] 3
[21:04:22] 5
[21:04:22] 2
[21:04:22] 3
[21:04:22] 5
[21:04:22] 2
[21:04:22] 3
[21:04:22] 5
Also to don`t forget my code is located in OnGameModeInit so.
Re: Bugging -
Abagail - 14.05.2014
Why do you use while? If I am not having a brain fart if could be used there...
pawn Код:
if(GangZones[RandomZone][OwnerTeam] != 0) GangZones[RandomZone][OwnerTeam] = i;
Re: Bugging -
Sanady - 14.05.2014
Quote:
Originally Posted by Abagail
Why do you use while? If I am not having a brain fart if could be used there...
pawn Код:
if(GangZones[RandomZone][OwnerTeam] != 0) GangZones[RandomZone][OwnerTeam] = i;
|
Ye I tried your code too before still same problem.
Re: Bugging -
Sanady - 14.05.2014
Quote:
Originally Posted by [HLF]Southclaw
What are you trying to achieve with this code?
No one can help if you don't write the problem and the expected outcome.
|
Problem is in this. I am using turf capturing system which I made. This part of code which is located in OnGameModeInit.And this code is ordering which turf will own which team. So Capturing Turf system is made that you are automaticly spawning on captured turf and if one team have only one turf captured enemy team can`t capture it.
Re: Bugging -
Sanady - 15.05.2014
Anyone?