Works on windows, issues on Linux?
#1

Hey there,

My script which is pretty basic(only 700 lines or so) runs perfectly on Windows but in Linux it connects fine, but when you spawn the whole server crashes. In the log there is no record of this it just says Incoming Connection and then that's the last line in the log before the server restarts itself. I believe the issue to be within OnPlayerSpawn, but I could be wrong.

Here's the code:
Код:
public OnPlayerSpawn(playerid)
{
  SetPlayerInterior(playerid, 0);
  GangZoneShowForPlayer(playerid, PD, 0xFFFF0096);
  GangZoneShowForPlayer(playerid, GANG, 0x00000096);
  	PICKUPGUN = CreatePickup(361, 23,	1294.2100,2797.0854,10.8220); //Flamethrower in the centre
 	PICKUPHEALTH2 = CreatePickup(1240, 23,	1186.7932,2757.8452,10.8281); //Health for team 1
 	PICKUPHEALTH1 = CreatePickup(1240, 23,	1354.1555,2781.8418,10.8203); //Health for team 2
  SetPlayerArmour(playerid, 100.0);
  	new s[120];
  format(s,10,"Team 2: %d",greenscore);
  TextDrawSetString(ScoreGreen,s);
  format(s,20,"Team 1: %d",redscore);
  TextDrawSetString(ScoreRed,s);
  //////////////////////////////////
  if(gTeam[playerid] == TEAM_GANG) {
	SetPlayerColor(playerid,COLOR_GREEN); //
	DisablePlayerCheckpoint(playerid);
	PICKUPP = CreatePickup(1210, 23, 1378.8456,2752.9397,10.2196); //FLAG
	PICKUPA = CreatePickup(1210, 23, 1141.4272,2741.7739,10.8197); //FLAG2
	GameTextForPlayer(playerid, "Capture the enemies flag and return it to our base", 6000, 0);
  playerarmy[playerid]=0;
  playerpolice[playerid]=0;
	SetPlayerCheckpoint(playerid,1378.8456,2752.9397,10.2196);
  //TextDrawHideForPlayer(playerid,Textdraw0);
  }
  if(gTeam[playerid] == TEAM_GANG2) {
	SetPlayerColor(playerid,COLOR_BLUE); //
	DisablePlayerCheckpoint(playerid);
	PICKUPP = CreatePickup(1210, 23, 1378.8456,2752.9397,10.2196); //FLAG
	PICKUPA = CreatePickup(1210, 23, 1141.4272,2741.7739,10.8197); //FLAG2
	GameTextForPlayer(playerid, "Capture the enemies flag and return it to our base", 6000, 0);
  playerarmy[playerid]=0;
  playerpolice[playerid]=0;
  SetPlayerCheckpoint(playerid,1141.4272,2741.7739,10.8197);
  //TextDrawHideForPlayer(playerid,Textdraw0);
	}
	return 1;
}
Any help on what's the issue here is appreciated.

Regards
Reply
#2

I've had many problems with Linux aswell, just use Windows, it's better than Linux.
Reply
#3

Quote:
Originally Posted by MenaceX^
I've had many problems with Linux aswell, just use Windows, it's better than Linux.
wot windows better than linix lmfao ya ok lol
Reply
#4

Quote:
Originally Posted by MenaceX^
I've had many problems with Linux aswell, just use Windows, it's better than Linux.
Its not Linuxґs fault, that not working junk-software is running on it.
Reply
#5

Fixed the issue, Linux obviously doesn't put up with my bad coding yet Windows seems to live with it, fixed some minor warnings which fixed the issue completley.
Reply
#6

linix is way more stable than windows if you got big popular server you using windows you doomed
Reply
#7

Use Linux, because people can hack a Windows server.
Reply
#8

Quote:
Originally Posted by iTails
Use Linux, because people can hack a Windows server.
And Linux can't be hacked? Yeah right.
Reply
#9

linix way more stable and can use scripts and all sorts windows just bag of shit
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)