Problem(error/warning): oko ucitavanja samp-server.exe
Deo skripte: :
Pawno Code: //
Debug iz server_log(ukoliko je u pitanju crashanje servera - crashdetect log): https://pastebin.com/2uFT0uwt ip je tu xd lagano
Pawno Code: //
//
Slika/video ingame problema(obavezno ako je ingame problem): https://pastebin.com/2uFT0uwt
kada se connecta na server, server se ugasi
SAMP-SERVER.exe problem
632
pregleda
9
postova
7. Dec. 2021.
V01D wrote on December 6, 2021, 10:43 pm:
LogSave (gde[]=@04e6ece4 "Ostalo/LogConnect.log", string[]=@0613dd0c "Igrac: almex | IP: 31.176.169.197 ") at C:\Users\almir\Desktop\VIBE GAMING\gamemodes\VG.pwn:14951Proveri liniju 14951
stock LogSave( gde[], string[]) {
new entry[ 128 ], s, m, se, day, year, month;
getdate( year, month, day );
gettimeEx( s, m, se );
FixHour( s );
s = shifthour;
format( entry, sizeof( entry ), "%d/%d/%d | %d/%d/%d | %s\r\n", day, month, year, s, m, se, string );
new File:hFile;
hFile = fopen( gde, io_append );
fwrite( hFile, entry );
fclose( hFile );
} ovo je cijeli taj stock7. Dec. 2021.
[22:57:39] #2 006e9b68 in public MP_OPC (playerid=0) at C:\Users\almir\Desktop\VIBE GAMING\gamemodes\VG.pwn:36761
[22:57:39] #3 native CallLocalFunction () from samp03svr
[22:57:39] #4 00628ac8 in public _y_utils_OnPlayerConnect (playerid=0) at C:\Users\almir\Desktop\VIBE GAMING\pawno\include\mSelection.inc:432
[22:57:39] #5 00035a48 in public SSCANF_OnPlayerConnect (playerid=0) at C:\Users\almir\Desktop\VIBE GAMING\pawno\include\YSI\..\YSI_Data\..\YSI_Internal\..\YSI_Core\y_utils.inc:301
[22:57:39] #6 00023e0c in public WC_OnPlayerConnect (playerid=0) at C:\Users\almir\Desktop\VIBE GAMING\pawno\include\sscanf2.inc:205
[22:57:39] #7 00007fbc in OnPlayerConnect (playerid=0, ... <1073741822 arguments>) at C:\Users\almir\Desktop\VIBE GAMING\pawno\include\weapon-config.inc:2151
[22:57:39] #8 0003a5d8 in public OnPlayerConnect (... <1 argument>) at C:\Users\almir\Desktop\VIBE GAMING\pawno\include\YSI\..\YSI_Data\..\YSI_Coding\..\YSI_Internal\y_cgen.inc:114
[22:57:39] #3 native CallLocalFunction () from samp03svr
[22:57:39] #4 00628ac8 in public _y_utils_OnPlayerConnect (playerid=0) at C:\Users\almir\Desktop\VIBE GAMING\pawno\include\mSelection.inc:432
[22:57:39] #5 00035a48 in public SSCANF_OnPlayerConnect (playerid=0) at C:\Users\almir\Desktop\VIBE GAMING\pawno\include\YSI\..\YSI_Data\..\YSI_Internal\..\YSI_Core\y_utils.inc:301
[22:57:39] #6 00023e0c in public WC_OnPlayerConnect (playerid=0) at C:\Users\almir\Desktop\VIBE GAMING\pawno\include\sscanf2.inc:205
[22:57:39] #7 00007fbc in OnPlayerConnect (playerid=0, ... <1073741822 arguments>) at C:\Users\almir\Desktop\VIBE GAMING\pawno\include\weapon-config.inc:2151
[22:57:39] #8 0003a5d8 in public OnPlayerConnect (... <1 argument>) at C:\Users\almir\Desktop\VIBE GAMING\pawno\include\YSI\..\YSI_Data\..\YSI_Coding\..\YSI_Internal\y_cgen.inc:114
9. Dec. 2021.
https://open.mp/docs/scripting/functions/fwrite
Using an invalid handle will crash your server! Get a valid handle by using fopen or ftemp.
99% je to da nemas folder/dir "Ostalo" u scriptfiles. Napravi ga.
Using an invalid handle will crash your server! Get a valid handle by using fopen or ftemp.
99% je to da nemas folder/dir "Ostalo" u scriptfiles. Napravi ga.
stock LogSave( gde[], string[]) {
new entry[ 128 ], s, m, se, day, year, month;
getdate( year, month, day );
gettimeEx( s, m, se );
FixHour( s );
s = shifthour;
format( entry, sizeof( entry ), "%d/%d/%d | %d/%d/%d | %s\r\n", day, month, year, s, m, se, string );
new File:hFile;
hFile = fopen( gde, io_append );
if (hFile) { // ako je handle validan tek onda koristis fwrite i fclose
fwrite( hFile, entry );
fclose( hFile );
}
}
9. Dec. 2021.
temporaryMember. wrote on December 9, 2021, 3:09 am:
@xunder nije 99% nego 100%, xunder je u pravu nemas dir Ostalo napravi to u scriptfiles
Nisam siguran sta se desava kada pokusas fopen file na kojem nemas permisiju za read, moguce je i da tada crashuje 🙄
10. Dec. 2021.
crasha ti kada skripta pokusava da ucita/spremi nesto iz nekog fajla kojeg nema u scriptfiles u tvome slucaju se radi o upisivanju u fajl koji ne postoji i desava se pad servera
// ovo ce ti crash jer ne provjerava je li validno i da li postoji fajl msm crash ce se desiti ako fajl ne postoji ali ako postoji ono ce izvrsiti radnju bez provjere ali vecinom slucaja se zaboravi napraviti i desi se boom :
ovo ti provjerava je li validno i ako ne moze da otvori ispisat ce da ne postoji:
// ovo ce ti crash jer ne provjerava je li validno i da li postoji fajl msm crash ce se desiti ako fajl ne postoji ali ako postoji ono ce izvrsiti radnju bez provjere ali vecinom slucaja se zaboravi napraviti i desi se boom :
new File:upis= fopen("upis.txt", io_read);
new buf;
fread(upis, buf);
fclose(upis);ovo ti provjerava je li validno i ako ne moze da otvori ispisat ce da ne postoji:
new File:upis = fopen("upisivanje.txt", io_read);
if (upis) {
new buf;
fread(upis, buf);
fclose(upis);
} else {
printf("ne moze se otvoriti upisivanje.txt izgleda da ne postoji");
}Morate biti prijavljeni da biste odgovorili na ovu temu.
Prijava
