Hello.
I say once could not fault the script .Problem lies in the engine 0.4
Server down if the player with ID 0 comes up and has the pickup with him and the player with ID 1 will take it
The server console shows: Segmentation fault
This video will show you how it happens
https://www.youtube.com/watch?v=dbhSf0F9x_w&feature=youtu.be
Tests for : Linux 32bit and Windows 32bit and Windows 64bit server on all version down/crash
A po polsku? Masz jakąś obsługę do claim pickup i pickedup?
Przed chwilą to sprawdziłem i nie mam żadnego problemu.
To jest funkcja która jest na onplayerpart
function ZgubWalizke( player )
{
if ( Walizka[0] == player.ID )
{
CreatePickup( 335, Vector( ( player.Pos.x + 2 ), player.Pos.y, player.Pos.z ) );
Walizka[0] = 999;
ClientMessageToAll( "** Gracz:[ " + player.Name + " ] zgubil walizke w rejonie " + GetDistrictName( player.Pos.x, player.Pos.y ) + ".", 255, 182, 193 );
}
}
A w function onPickupClaimPicked( player, pickup )
switch( pickup.Model )
{
case 508:
Message( "[#ffffff][INFO][#D031DB] Gracz [#1FFFF9]" + player.Name + "[#D031DB] znalazl keycard. Gratulacje. :)" );
player.Cash += 5000; stats[ player.ID ].Cash += 5000; stats[ player.ID ].KeyCard++; keycards--;
PlaySound( 1 , 475 , player.Pos );
pickup.Remove();
break;
}
Na wersji 0.3 nie było takiego problemu z tą funkcją
Żeby onPickupPickedUp się wykonał, musisz w funkcji claim zwrócić 1. W onPickupPickedUp zrób usuwanie wiadomości i usuwanie pickupa, a w onPickupClaimPickup tylko sprawdzanie.
No offense but I thought this was an English forum? How can someone with the same issue understand anything in the future?
Don't worry, I will explain it when the problem is solved.
Nadal jest błąd wejdź na serwer PS hasło ; niewiem50
Wiem o co chodzi. Poprawiam w źródłach. :P
:)
Będzie można gdzieś skompilować update modułu/serwera ?
Mariu22S creates a pickup everytime when player leaves the server. The problem happens with created pickup, because while removing it, the server immediately crashes. It's connected with removing and adding instances almost the same time.
The temporary solution for it is creating the pickup with NewTimer function that works well in 0.4.
@Mariu22S, w ZgubWalizke:
CreatePickup( 335, Vector( ( player.Pos.x + 2 ), player.Pos.y, player.Pos.z ) );
na:
NewTimer("CreatePickupFix", 100, 1, 335, player.Pos.x, player.Pos.y, player.Pos.z );
Funkcja:
function CreatePickupFix(model, x, y, z) CreatePickup(model, Vector(x, y, z));
Wszystko działa. Dzięki
Everything works
Quote from: Gudio on Jan 24, 2015, 01:10 PMThe temporary solution for it is creating the pickup with NewTimer function that works well in 0.4.
@Mariu22S, w ZgubWalizke:
CreatePickup( 335, Vector( ( player.Pos.x + 2 ), player.Pos.y, player.Pos.z ) );
na:
NewTimer("CreatePickupFix", 100, 1, 335, player.Pos.x, player.Pos.y, player.Pos.z );
Funkcja:
function CreatePickupFix(model, x, y, z) CreatePickup(model, Vector(x, y, z));
AFAIK you should be able to use the CreatePickup function directly without using any proxies.
NewTimer("CreatePickup", 100, 1, 335, player.Pos);
You can't pass instances via timer atm.
Semi-resolved. Duplicate of an existing bug.
https://bitbucket.org/stormeus/0.4-squirrel/issue/9/some-types-of-data-crash-timers