[HELP]Randoms spawn crash linux server![SOMEONE HELP]
#1

SOLVED -_-
Reply
#2

instead of doing it that way:
create a new array on top of script:
pawn Код:
new RandomSpawnArray[][4] = {
//{x,y,z,time}
{361.9560,2537.5532,19.6391,0},
{-2232,2325,8,12}
};
and there when you did that switch function, replace all that with:
pawn Код:
new rand = random(sizeof(RandomSpawnArray));
SetPlayerPos(playerid,RandomSpawnArray[rand][0],RandomSpawnArray[rand][1],RandomSpawnArray[rand][2]);
SetPlayerTime(playerid,RandomSpawnArray[rand][3]);
This way, you can paste more spawns, without editing function, just add more
{x,y,z,time}
( don't forget to add a , behind previous spawn then.
Reply
#3

........
Reply
#4

Use debug info: https://github.com/Zeex/samp-plugin-...ith-debug-info
Re-compile your scripts, upload to host, start the server, connect and try to spawn. Post what it printed.
Reply
#5

Quote:
Originally Posted by ShivRp
Посмотреть сообщение
This works cool in my homehost, but after i upload to host,,
i get crashed again!
Please help me someone!
Then it's not problem in that random spawn, I think. Can you show me all of your OnPlayerSpawn or where ever it is.

Do you have plugins corresponding to your linux version? I heared there sometimes are issues with Debian and Cent OS, not quite sure.
Reply
#6

....
Reply
#7

Quote:
Originally Posted by ShivRp
Посмотреть сообщение
now i get new error bro,,
its locating one of my include!
But i didn't use that include in my script!
Код:
[10:07:22] [debug] Server crashed while executing Script1v34.amx
[10:07:22] [debug] AMX backtrace:
[10:07:22] [debug] #0 00000004 in ?? () at C:\Users\Shiv\Desktop\0.3z\pawno\include\float.inc:120
please post all OnPlayerSpawn.
Reply
#8

There are cases that the server gets crashed and the reason is unknown - some of them point at the float include (it's included in a_samp.inc so you actually use it) and it shows some of the operators (==, + etc).

I've read an old thread few months ago about similar problems and using some floating points numbers as integers caused that.

So change it to:
pawn Код:
new Float: RandomSpawnArray[][4] =
{
    {361.9560,2537.5532,19.6391},
    {-2232.0,2325.0,8.0}
};

// OnPlayerSpawn:
new rand = random(sizeof (RandomSpawnArray));
SetPlayerPos(playerid, RandomSpawnArray[rand][0], RandomSpawnArray[rand][1], RandomSpawnArray[rand][2]);
SetPlayerTime(playerid, random(2) ? (0) : (12));
and tell us the results.

I can't think of anything else that would cause such as problem.

EDIT: I thought it was the angle, not the time. But still what I said applies.
Reply
#9

Quote:
Originally Posted by Konstantinos
Посмотреть сообщение
There are cases that the server gets crashed and the reason is unknown - some of them point at the float include (it's included in a_samp.inc so you actually use it) and it shows some of the operators (==, + etc).

I've read an old thread few months ago about similar problems and using some floating points numbers as integers caused that.

So change them to:
pawn Код:
{361.9560, 2537.5532, 19.6391, 0.0},
{-2232.0, 2325.0, 8.0, 12.0}
and tell us the results.

I can't think of anything else that would cause such as problem.
In that case, he'll get Tag Mismatch error for sure, altho', it works on windows and does not on linux, which is weird aswell.
Reply
#10

........
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)