Bugging
#1

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.
Reply
#2

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;
Reply
#3

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.
Reply
#4

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.
Reply
#5

Anyone?
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)