Streamer Area Causing SA:MP Client to Crash
#1

I am trying to script the fuel system and I'm having a weird issue. Everytime I pull a vehicle into the gas station area the players SA:MP client will crash. There are no script errors or warnings in pawn, and nothing in the server log or crash log. It simply just crashes the players client. Here is the code being used for it.

OnGameModeInit
pawn Код:
GasArea[0] = CreateDynamicRectangle(40.35, 1213.57, 61.37, 1222.19);
public PlayerIsAtPump(playerid)
pawn Код:
public PlayerIsAtPump(playerid) {

    for(new i; i < sizeof(GasArea); i++) {
   
        if(IsPlayerInDynamicArea(playerid, GasArea[i])) {
       
            return 1;
           
        }
       
    }
   
    return 0;
   
}
/fill Command
pawn Код:
CMD:fill(playerid, params[]) {

    new cv, vehd, model, fuelprice;
   
    new Float:gal, Float:needgal, capacity, perc, Float:costa, Float:cost, finalcost;
   
    cv = GetClosestCar(playerid);
    vehd = GetDistanceToCar(playerid, cv);
    model = GetVehicleModel(cv);

    if(PlayerIsAtPump(playerid)) {

        if(vehd <= 5.00) {
       
// not actually filling the vehicle or charging the person money for debugging purposes

//          VehicleData[cv-1][vFuel] = 100;
           
//          format(myquery, sizeof(myquery), "UPDATE saes_vehicles SET fuel='100' WHERE id='%i'", cv);
//          mysql_query(myquery);
           
            capacity = VehicleFuelCapacity[model-400];
           
            gal = capacity/100;
            perc = 100-VehicleData[cv-1][vFuel];
           
            fuelprice = 3;
           
            costa = floatmul(gal,perc);
           
            cost = floatmul(costa, fuelprice);
           
            needgal = floatmul(gal,perc);
           
            finalcost = floatround(cost, floatround_ceil);
           
            format(msgstring, sizeof(msgstring), "Car filled, %f gallons at $%i", needgal, finalcost);
           
            SendClientMessage(playerid, -1, msgstring);

        } else {
       
            SendClientMessage(playerid, COLOR_YELLOW, "[ ! ] You are not near a vehicle.");
           
        }
       
    } else {
   
        SendClientMessage(playerid, COLOR_YELLOW, "[ ! ] You are not at a gas pump.");
       
    }
   
    return 1;
   
}
I am using Streamer 2.6 and 0.3e. I use 2.6 because 2.6.1 will not run on the server. The PlayerIsAtPump function worked fine and the vehicle could use the command in the area yesterday when I had an older version of the streamer loaded. Now that I upgraded to 2.6 it compiles fine, but will crash the client as I said before.

Any help would be greatly appreciated.
Reply
#2

Nevermind, I figured out this may be a streaming issue, not anything to do with the area in specific. Now I crash whenever I'm driving around.
Reply
#3

See if there are any objects created near the area. They may cause your game to crash whenever you are close if duplicated in the same stop or used in some certain areas.
Reply
#4

Man, I've tried everything. I've tried like 4 different versions of the streamer, removing all of the recent changes in the gamemode, and nothing is working. I don't understand why this bug just randomly appeared. Our community is very close to beta and I'd hate to start over from scratch. I can't even figure out what's causing it. Nothing has changed in the mapping since the bug started. This is very disappointed to see months of hard work on this gamemode go to waste when not being able to get rid of such a stupid bug. Here is the exception error I'm getting:

Код:
SA-MP 0.3e
Exception At Address: 0x007324B6

Registers:
EAX: 0xC1000000	EBX: 0x0000002F	ECX: 0x19D39158	EDX: 0x00000061
ESI: 0x00000007	EDI: 0x1BB3DE90	EBP: 0x1B53DCB8	ESP: 0x0028FCA8
EFLAGS: 0x00210293

Stack:
+0000: 0x048654C8   0x048654C8   0x00000061   0x00000000
+0010: 0xFFFFFFFF   0x00FFFFFF   0x00000270   0x00C4D958
+0020: 0x00000018   0x0AD12790   0x00000000   0x0028FCF4
+0030: 0x6765017F   0x0000001C   0x00000000   0x0AD12790
+0040: 0x00000001   0x0028FD0C   0x6765017F   0x0000001C
+0050: 0x00000001   0x0AD12560   0x0028FD0C   0x67759588
+0060: 0x00000002   0x0028FD30   0x6764CD5E   0x0A890040
+0070: 0x0028FD28   0x0000001C   0x3D7B8000   0x00000000
+0080: 0x0000001C   0x00000001   0x00000061   0x00000000
+0090: 0x42C21F70   0x00000001   0x175ACF2E   0x0000001A
+00A0: 0x00000001   0x75A06C30   0x00732639   0x1B53DCB8
+00B0: 0x00000061   0x0E13F888   0x00732BDC   0x048654C8
+00C0: 0x1B53DCB8   0x00000061   0x75A06C30   0x0000001A
+00D0: 0x056D2B6C   0x00733F2A   0x0E13F800   0x445D080A
+00E0: 0x00000001   0x0053E01E   0x00000000   0x0053EAA6
+00F0: 0x0030D1BC   0x0053EAC4   0x44340000   0x43E10000
+0100: 0x0053ECC2   0x00000001   0x00619B71   0x0000001A
+0110: 0x00000001   0x00000001   0x0000000A   0x00748DA0
+0120: 0x0000001A   0x00000001   0x750F1245   0x00000000
+0130: 0x0028FF88   0x7EFDE000   0x01300000   0x4EE9F817
+0140: 0x003010F0   0x00000008   0x00000100   0x00000008
+0150: 0x00000102   0x44340000   0x43E10000   0x00000000
+0160: 0x00000000   0x000005A0   0x00000384   0x00000000
+0170: 0x00000001   0x00480188   0x00000200   0x00000000
+0180: 0x01C202D0   0x00E6F51C   0x000002D0   0x000001C2
+0190: 0x0000002C   0x0028FE2C   0x00825EA4   0x750F1245
+01A0: 0x00000000   0x7EFDE000   0xFFFFFFFF   0x00821D17
+01B0: 0x00000065   0x00000065   0x0028FF88   0x008246F1
+01C0: 0x00400000   0x00000000   0x01BA2DEB   0x0000000A
+01D0: 0x00000094   0x00000006   0x00000001   0x00001DB1
+01E0: 0x00000002   0x76726553   0x20656369   0x6B636150
+01F0: 0x00003120   0x00000000   0x00000000   0x00000000
+0200: 0x00000000   0x00000000   0x00000000   0x00000000
+0210: 0x00000000   0x00000000   0x00000000   0x00000000
+0220: 0x00000000   0x00000000   0x00000000   0x00000000
+0230: 0x00000000   0x00000000   0x00000000   0x00000000
+0240: 0x00000000   0x00000000   0x00000000   0x00000000
+0250: 0x00000000   0x00000000   0x00000000   0x00000000
+0260: 0x00824588   0x00000000   0x00000000   0x7EFDE000
+0270: 0xC0000005   0x00000000   0x01BA2DEB   0x00000044

SCM Op: 0x77E, lDbg: 0

Game Version: US 1.0

State Information: Ped Context: 0
All players get it on my server. Sometimes randomly, but mostly when pulling into the gas station. I completely removed the dynamic area stuff and took all of the related stuff out and it still crashes. I've recompiled everything with the latest includes and I just can't fix it.

Any help would be GREATLY appreciated.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)