SA-MP Forums Archive
MySQL problem - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: MySQL problem (/showthread.php?tid=325604)



MySQL problem - N0FeaR - 13.03.2012

Hey, when i add more cars into my MySQL they not come in game whats the problem?


Re: MySQL problem - Lee_Percox - 14.03.2012

Can you show us some of the loading code?

Have you checked your array sizes? How many vehicles? If your using for loops with a set size or a while loop for all cars? etc


Re: MySQL problem - N0FeaR - 14.03.2012

Where can i find array sizes? into the script then?


Re: MySQL problem - Lee_Percox - 14.03.2012

Well I guess your storing the vehicle information in something like mycar[carid][someinfo]; right? If your not then apologies, if you are check that carid is set to MAX_VEHICLES and ensure you don't have more than MAX_VEHICLES trying to load in.

The best thing to do is show us your loading code.


Re: MySQL problem - N0FeaR - 14.03.2012

Nope there no limit so what then can be the problem?


Re: MySQL problem - N0FeaR - 14.03.2012

pawn Код:
stock GetOwnedVehicleID(playerid)
{
    for(new v = 1; v < MAX_VEHICLES; v++)
    {
        if (IsVehicleSpawned(v))
        {
            if (!strcmp(VehicleInfo[v][vOwner], GetName(playerid))) return v;
        }
    }
    return INVALID_VEHICLE_ID;
}



Re: MySQL problem - T0pAz - 14.03.2012

Show your load vehicle function.