Server lost connection caused by timer(?) [Strange error]
#1

Hi!


I was working on my turf war system for my server..

When I got the third done, the area just keept blinked even if it should be finished

long time ago!. I have 2 other areas it is exactily the same "settings" etc on them like on the other ones, but
the error just causing/shows up on the third one...

When it just keept blinked there I thought the server crashed or something so

I wrote a message in the chat, to find out, when I sent: the server then said: Lost connection when I sent the message...
Yeah so there probably were some crash or issue...

There are still some issue on the other turf areas when you will take the turf its blinking
but if you write something while the turf is blinking the server will lost connection...


I can show a gang zone area, so you know how my script looks, if that helps..
It's not advanced, just a simply one and not fully done.


On PlayerPickupPickup:


pawn Код:
if(pickupid == MotelVTurf)
    {
        {
        SetTimer("MotelTurfT", 9000,false);
        GangZoneShowForAll(MotelVZone,GetPlayerColor(playerid));
        GangZoneFlashForAll(MotelVZone,(playerid));
        }
        return 1;
         
    }

The timer:

pawn Код:
public MotelVTurfT(playerid)
{
    GangZoneStopFlashForAll(MotelVZone);
    GivePlayerMoney(playerid, 9000);

}

I have 6 timers.. But they aren't running at the same time, if that info makes any sense ^^...
Reply
#2

In the 1st code, remove the inner pair of brackets.
Reply
#3

Quote:
Originally Posted by HurtLocker
Посмотреть сообщение
In the 1st code, remove the inner pair of brackets.
Thanks a lot!

I thought I should get like 5000 errors, why aren't they needed?.. Shoulden't they be there

by standard? In OnPlayerPickupPickup ?..


I will try this out and see if it solve the problem.


Edit: Still the same problem!.
Reply
#4

SetTimer("MotelVTurfT", 9000, false);
public MotelVTurfT(playerid)
Reply
#5

Quote:
Originally Posted by HurtLocker
Посмотреть сообщение
SetTimer("MotelVTurfT", 9000, false);
public MotelVTurfT(playerid)
Oh, a typo just!, thanks alot!.


Edit: Still problem, you can't write anything in the chat while capturing the turf. And also not after

when it's finished, it will say: Server lost connection...
Reply
#6

Still problem/s
Reply
#7

pawn Код:
GangZoneFlashForAll(MotelVZone,(playerid));
Looks like you forgot GetPlayerColor there, but still it should be syntactically correct code. A pair of braces on their own are also syntactically correct and they allow you to do something like this for debugging purposes:

pawn Код:
//if(!IsPlayerConnected(target))
{
    SendClientMessage(target, -1, "Blah");
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)