[HELP] My Gamemode has a problem with Public functions
#1

Hello. I stopped working on my gamemode for about 3 months now because there is a bug anywhere in 16000 lines that I can't find. Compiling goes without errors or warnings.

It says just this:

Header size: 9148 bytes
Code size: 718824 bytes
Data size: 2504788 bytes
Stack/heap size: 16384 bytes; estimated max. usage=4315 cells (17260 bytes)
Total requirements: 3249144 bytes




The problem is, that in some public functions some lines doesnt execute.

example:

Код:
public OnPlayerEnterDynamicCP(playerid, checkpointid)
{
     if(checkpointid == OttoDestroy)
     {
	if(BuyingInProgress == 1) { return SendClientMessage(playerid,rot,"[OTTO]: Please wait a moment. There is another customer now!"); }
        else if(IsPlayerInAnyVehicle(playerid)) { return SendClientMessage(playerid,rot,"[OTTO]: Park the car outside and come back!"); }
	else if(PlayerInfo[playerid][cid] == 0) { return SendClientMessage(playerid,rot,"[OTTO]: You don't have a Car to sell it here!"); }
	else{
	        SetTimer("ResetBuyingInProgress",6000,0);
		BuyingInProgress = 1;
                //EVERYTHING UNTIL HERE WILL BE EXECUTED AND WORKS
                
                //BUT FROM NOW THESE LINES WILL BE IGNORED SOMEHOW AND THEY DONT WORK:
                DestroyCar(GetPlayerVehicleID(playerid));
                GivePlayerMoney(playerid,10000);
              }
      }
      return 1;
}
And on this way i have it in a few other publics too.

For Example in my Speedometer public.
The first few lines will be executed but after a few lines the next lines will be ignored.

And the same for dialogs. Even always the first few lines will be executed. o.O


Please let me know if you have any ideas, what could be wrong in my script or is there maybe a bug in plugins or filterscripts i use?


Details:

plugins:
IRC by Incognito
Streamer by Incognito
GeoIP Plugin (unknown)

filterscripts:
tunecar (unknown)


thx for any ideas you have!

greets CJ
Reply
#2

No ONE?
Reply
#3

if you repeat the code:

pawn Код:
public OnPlayerEnterDynamicCP(playerid, checkpointid)
{
    if(checkpointid == OttoDestroy)
    {
        if(BuyingInProgress == 1) { return SendClientMessage(playerid,rot,"[OTTO]: Please wait a moment. There is another customer now!"); }
        else if(IsPlayerInAnyVehicle(playerid)) { return SendClientMessage(playerid,rot,"[OTTO]: Park the car outside and come back!"); }
        else if(PlayerInfo[playerid][cid] == 0) { return SendClientMessage(playerid,rot,"[OTTO]: You don't have a Car to sell it here!"); }
        else
        {
            SetTimer("ResetBuyingInProgress",6000,0);
            BuyingInProgress = 1;
            //EVERYTHING UNTIL HERE WILL BE EXECUTED AND WORKS
               
            //BUT FROM NOW THESE LINES WILL BE IGNORED SOMEHOW AND THEY DONT WORK:
            DestroyCar(GetPlayerVehicleID(playerid));
            GivePlayerMoney(playerid,10000);
            DestroyCar(GetPlayerVehicleID(playerid));
            GivePlayerMoney(playerid,10000);
        }
    }
    return 1;
}
or switch positions:

pawn Код:
public OnPlayerEnterDynamicCP(playerid, checkpointid)
{
    if(checkpointid == OttoDestroy)
    {
        if(BuyingInProgress == 1) { return SendClientMessage(playerid,rot,"[OTTO]: Please wait a moment. There is another customer now!"); }
        else if(IsPlayerInAnyVehicle(playerid)) { return SendClientMessage(playerid,rot,"[OTTO]: Park the car outside and come back!"); }
        else if(PlayerInfo[playerid][cid] == 0) { return SendClientMessage(playerid,rot,"[OTTO]: You don't have a Car to sell it here!"); }
        else
        {
            DestroyCar(GetPlayerVehicleID(playerid));
            GivePlayerMoney(playerid,10000);
            //EVERYTHING UNTIL HERE WILL BE EXECUTED AND WORKS
               
            //BUT FROM NOW THESE LINES WILL BE IGNORED SOMEHOW AND THEY DONT WORK:
            SetTimer("ResetBuyingInProgress",6000,0);
            BuyingInProgress = 1;
        }
    }
    return 1;
}
Still not working?
Reply
#4

No its still not working. Thats weird. Pls more help.
Reply
#5

Is it possible that I got a virus on cmp that is f**cking up my gamemode or maybe pawno?

The funny thing is my gamemode works on Linux servers correctly just not on windows server o.O
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)