0 Errors but gamemode blocks itself
#1

My gamemode crashes after a few minutes, I mean, you can't type any message or command, and all functions are disabled, but there is no error about pawn compiler. Please I need help, seriously , can you tell me how to do? What do you think about this one?
Reply
#2

Possibly an infinite loop. Do you have any while() loops?
Reply
#3

No I don't, why happens this? :l
Reply
#4

Do you have any loops at all?

search

for(new
Reply
#5

I have a lot of cicle named for(new [...]
but when pawn compiles there is no error about anything
Reply
#6

Is your server freeze or just crashed?
Reply
#7

No, my server doesn't work any longer after a few minutes that's I can't type any command or message and I can't know why
Reply
#8

Quote:
Originally Posted by Steveproxy5
Посмотреть сообщение
I have a lot of cicle named for(new [...]
but when pawn compiles there is no error about anything
The compiler only checks the syntax. It does not account for logical errors. Consider:

pawn Код:
for(new i = 100; i > 0; i++)
{
    printf("%d", i);
}
This will run forever because i is forever greater than 0. The programmer intended to write 'i--', but due to force of habit wrote 'i++'.
Reply
#9

Quote:
Originally Posted by Vince
Посмотреть сообщение
The compiler only checks the syntax. It does not account for logical errors. Consider:

pawn Код:
for(new i = 100; i > 0; i++)
{
    printf("%d", i);
}
This will run forever because i is forever greater than 0. The programmer intended to write 'i--', but due to force of habit wrote 'i++'.
Ok, how can I do then?
Reply
#10

I can't see any issues with the Server log. It brings us back to the loops. As MP2 said, there could be an illogical loop causing an infinite loop, this will crash ANY script, your best bet is check any recently added or edited loops and post them here.
Reply
#11

What do you think about ->
Code:
forward azione(playerid,string[]);
public azione(playerid,string[])//HO DOVUTO METTERE QUESTO PERCHE' NON SO' COM'E' FATTA LA VOSTRA GM
{
    for(new u = 0; u < MAX_PLAYERS; u++)
    {
		if(IsPlayerConnected(u))
		{
        	if( GetDistanceBetweenPlayers(playerid,u) < 30 )
            {
        	    SendClientMessage(u,0xFFFFFFAA,string);
            }
		}
    }
}
forward crescita();
public crescita()
{
	for(new i=0;i<MAX_PLAYERS;i++)
    {
    	if(IsPlayerConnected(i))
        {
            if( StatoPianta[i] >= 1 )
            {
                StatoPianta[i] += 1;
                if( StatoPianta[i] < 20 )
                {
                	new Float:lX,Float:lY,Float:lZ;
                    GetObjectPos(Pianta[i],lX,lY,lZ);
                    MoveObject(Pianta[i],lX,lY,lZ+0.05,2.0);
                }
            }
		}
	}
}

case 3:
   			  {
   			    	if(IsPlayerConnected(playerid))
        			{
            			if(gPlayerLogged[playerid] == 0)
            			{
                			SendClientMessage(playerid, 0xFF0000AA, "Devi effettura prima il login");
                			return 1;
            			}
               for(new i=0; i<MAX_PLAYER_ATTACHED_OBJECTS; i++)
                        {
                        if(IsPlayerAttachedObjectSlotUsed(playerid, i)==0) {
			            SetPlayerAttachedObject(playerid, 1, 3026, 1, -0.125, -0.046, -0.004, -1.299, -0.5, -6.297, 1.0, 1.0, 1.0);
			            }
			            else {
			            RemovePlayerAttachedObject(playerid, i);
			            }

                       }
					}
				}
Reply
#12

I'm becoming mad, I can't solve this problem, what may I do?
Reply
#13

I'm trying to replace all 'i' with 'playerid'
Reply
#14

help me please i'm desperate i don't know anymore what to do
Reply
#15

pawn Code:
sscanf error: The current build ONLY supports 0.3d

Loading plugin: MapAndreas.dll
Failed.

EnableTirePopping() function is removed.

[warning] EnableZoneNames() is removed since 0.3

AllowAdminTeleport() : function is deprecated. Please see OnPlayerClickMap()
and you surprised that the server dies... in my opinion its from MapAndreas, you are using some functions from this plugin but he's not loaded so result could be one and sscanf error is also important

+

install crashdetect plugin and you will see what's exactly wrong
Reply
#16

Undo last changes you did, or delete functions till your GM works, then you'll know which part is wrong...
Reply
#17

Codes removed
pawn Code:
EnableTirePopping() function is removed. //removed

[warning] EnableZoneNames() is removed since 0.3 //removed

AllowAdminTeleport() : function is deprecated. Please see OnPlayerClickMap() //Function need to be fixed
and try download new verison of sscanf and MapAndreas.inc % MapAndreas.dll Plugin hope you fix it
Reply
#18

I tried to download sscanf and streamer but there was no positive effect. Is stramer.dl same of mapandreas? I cant find this one
Reply
#19

Quote:
Originally Posted by Steveproxy5
Посмотреть сообщение
No, my server doesn't work any longer after a few minutes that's I can't type any command or message and I can't know why
That mean your server freeze . If you using YSI3.1 then your problem would not be fix. Try to use YSI4.0 . It will help you to fix that. If you get for then 2+warning of Foreach loop , that mean you didn't update the loop of the foreach.

Old code is
PHP код:
foreach(player,i
new code is
PHP код:
foreach(new iplayer
If it don't help you then please -rep
Reply
#20

So do i have to replace ones each other?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)