SA-MP Forums Archive
Works on windows, issues on Linux? - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Works on windows, issues on Linux? (/showthread.php?tid=80903)



Works on windows, issues on Linux? - Acoole - 07.06.2009

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


Re: Works on windows, issues on Linux? - MenaceX^ - 07.06.2009

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


Re: Works on windows, issues on Linux? - Etthan - 07.06.2009

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


Re: Works on windows, issues on Linux? - Remis93 - 07.06.2009

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.


Re: Works on windows, issues on Linux? - Acoole - 07.06.2009

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.


Re: Works on windows, issues on Linux? - Etthan - 07.06.2009

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


Re: Works on windows, issues on Linux? - RobertGraham - 07.06.2009

Use Linux, because people can hack a Windows server.


Re: Works on windows, issues on Linux? - Burridge - 07.06.2009

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


Re: Works on windows, issues on Linux? - Etthan - 07.06.2009

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