Server Crashes on Spawn/Connect
#1

As soon as i connect the server.exe just closes, i checked the logs just says Player Joined the server and thats it.What is this?
Reply
#2

All you need is located here:

https://sampwiki.blast.hk/

Peace...
Reply
#3

I'm Currently searching, so far nothing.
Reply
#4

Show us ALL your OnPlayerConnect code. There is a function that is, well, failing.
Reply
#5

pawn Код:
public OnGameModeInit()
{
    mysql_init();
    if(!mysql_connect("localhost", "rayyan","k","rayyan_westside"))
    {
       print("\n MySQL Connection Failed, Now on Offline Mode\n");
       Offline = 1;
    }
    else
    {
      Offline = 0;
    }
    SetTimer("ServerUpdate",120000, true);
    SetGameModeText("WS-RPG2");
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
       BankTimer = SetTimerEx("BankCheck", 1000, true, "i", i);
       timetimer = SetTimerEx("TimeUpdate", 60000, true, "i", i);
       //SetTimer("LoadCars", 2500, false);
       //SetTimerEx("IsAtGasStation",2000,1,"i",i);
    }
    for(new i=0;i<MAX_VEHICLES;i++) {
        fuel[i] = 100; //sets every car's fuel to 100 in a loop
    }
    SetTimer("timer_fuel_lower",4200,true); //sets the timer to drop the fuel
    print("[ ! ] Fuel Bar Loaded");
    LimitGlobalChatRadius(30);
    SetWorldTime(5);
    ghour = 5;
    gminute = 0;
    gsecond = 1;
The rest is AddPlayerClass, Vehilce
Reply
#6

How is your mysql code executing? Try printing something (print) after mysql_init(); - otherwise i dont see whats wrong.
Reply
#7

IT shows that "MySQL Connection Failed" Thing
Reply
#8

Try printing after your if block then, or add prints after every line to see where it stops.
Reply
#9

I think it maybe my onplayerconnect.Ill post here:
pawn Код:
public OnPlayerConnect(playerid)
{
  if(Offline == 1)
   {
     OfflineLogin(playerid);
     return 0;
   }
After that its my MySQL Check which doesnt execute cos its Offline
Reply
#10

48 HOUR BUMP!Please help, its not the mysql i think.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)