[Pomoc] Debug


Započeo Scripter Braun, Januar 04, 2016, 20:44:04 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

Skripta koju koristim: Ne bitno
Detaljan opis problema: Nije problem nista me ne zajebava na serveru al zasto izbacuje ovo debug ???
Dio skripte:
[20:39:03] [debug] Run time error 3: "Stack/heap collision (insufficient stack size)"
[20:39:03] [debug]  Stack pointer (STK) is 0x1BB9208, heap pointer (HEA) is 0x1BB91D8
[20:39:03] [debug] AMX backtrace:
[20:39:03] [debug] #0 00173ac0 in ?? (0) from ASRP.amx
[20:39:03] [debug] #1 00173b90 in ?? (0) from ASRP.amx
[20:39:03] [debug] #2 00173b90 in ?? (0) from ASRP.amx
[20:39:03] [debug] #3 00173b90 in ?? (0) from ASRP.amx
[20:39:03] [debug] #4 00173b90 in ?? (0) from ASRP.amx
[20:39:03] [debug] #5 00173b90 in ?? (0) from ASRP.amx
[20:39:03] [debug] #6 00173b90 in ?? (0) from ASRP.amx
[20:39:03] [debug] #7 00173b90 in ?? (0) from ASRP.amx
[20:39:03] [debug] #8 00173b90 in ?? (0) from ASRP.amx
[20:39:03] [debug] #9 00173b90 in ?? (0) from ASRP.amx
[20:39:03] [debug] #10 00173b90 in ?? (0) from ASRP.amx
[20:39:03] [debug] #11 00173b90 in ?? (0) from ASRP.amx
[20:39:03] [debug] #12 00173b90 in ?? (0) from ASRP.amx
[20:39:03] [debug] #13 00173b90 in ?? (0) from ASRP.amx
[20:39:03] [debug] #14 00173b90 in ?? (0) from ASRP.amx
[20:39:03] [debug] #15 00173b90 in ?? (0) from ASRP.amx
[20:39:03] [debug] #16 00173b90 in ?? (0) from ASRP.amx
[20:39:03] [debug] #17 00173b90 in ?? (0) from ASRP.amx
[20:39:03] [debug] #18 00173b90 in ?? (0) from ASRP.amx
[20:39:03] [debug] #19 00173b90 in ?? (0) from ASRP.amx
[20:39:03] [debug] #20 00173b90 in ?? (0) from ASRP.amx
[20:39:03] [debug] #21 00173b90 in ?? (0) from ASRP.amx
[20:39:03] [debug] #22 00173b90 in ?? (0) from ASRP.amx
[20:39:03] [debug] #23 00173b90 in ?? (0) from ASRP.amx
[20:39:03] [debug] #24 00173b90 in ?? (0) from ASRP.amx
[20:39:03] [debug] #25 00173b90 in ?? (0) from ASRP.amx
[20:39:03] [debug] #26 00173b90 in ?? (0) from ASRP.amx
[20:39:03] [debug] #27 00173b90 in ?? (0) from ASRP.amx
[20:39:03] [debug] #28 00173b90 in ?? (0) from ASRP.amx
[20:39:03] [debug] #29 00173b90 in ?? (0) from ASRP.amx
[20:39:03] [debug] #30 00173b90 in ?? (0) from ASRP.amx
[20:39:03] [debug] #31 00173b90 in ?? (0) from ASRP.amx
[20:39:03] [debug] #32 00173b90 in ?? (0) from ASRP.amx
[20:39:03] [debug] #33 00173b90 in ?? (0) from ASRP.amx
[20:39:03] [debug] #34 00173b90 in ?? (0) from ASRP.amx
[20:39:03] [debug] #35 00173b90 in ?? (0) from ASRP.amx
[20:39:03] [debug] #36 00173b90 in ?? (0) from ASRP.amx
[20:39:03] [debug] #37 00173b90 in ?? (0) from ASRP.amx
[20:39:03] [debug] #38 00173b90 in ?? (0) from ASRP.amx
[20:39:03] [debug] #39 00173b90 in ?? (0) from ASRP.amx
[20:39:03] [debug] #40 00173b90 in ?? (0) from ASRP.amx
[20:39:03] [debug] #41 00173b90 in ?? (0) from ASRP.amx
[20:39:03] [debug] #42 00173b90 in ?? (0) from ASRP.amx
[20:39:03] [debug] #43 00173b90 in ?? (0) from ASRP.amx
[20:39:03] [debug] #44 00173b90 in ?? (0) from ASRP.amx
[20:39:03] [debug] #45 00173b90 in ?? (0) from ASRP.amx
[20:39:03] [debug] #46 00173b90 in ?? (0) from ASRP.amx
[20:39:03] [debug] #47 00173b90 in ?? (0) from ASRP.amx
[20:39:03] [debug] #48 00173b90 in ?? (0) from ASRP.amx
[20:39:03] [debug] #49 00173b90 in ?? (0) from ASRP.amx
[20:39:03] [debug] #50 00173b90 in ?? (0) from ASRP.amx
[20:39:03] [debug] #51 00173b90 in ?? (0) from ASRP.amx
[20:39:03] [debug] #52 00173b90 in ?? (0) from ASRP.amx
[20:39:03] [debug] #53 00173b90 in ?? (0) from ASRP.amx
[20:39:03] [debug] #54 00173b90 in ?? (0) from ASRP.amx
[20:39:03] [debug] #55 00173b90 in ?? (0) from ASRP.amx
[20:39:03] [debug] #56 00173b90 in ?? (0) from ASRP.amx
[20:39:03] [debug] #57 00173b90 in ?? (0) from ASRP.amx
[20:39:03] [debug] #58 00173b90 in ?? (0) from ASRP.amx
[20:39:03] [debug] #59 00173b90 in ?? (0) from ASRP.amx
[20:39:03] [debug] #60 00173b90 in ?? (0) from ASRP.amx
[20:39:03] [debug] #61 00173b90 in ?? (0) from ASRP.amx
[20:39:03] [debug] #62 00173b90 in ?? (0) from ASRP.amx
[20:39:03] [debug] #63 00173b90 in ?? (0) from ASRP.amx
[20:39:03] [debug] #64 00173b90 in ?? (0) from ASRP.amx
[20:39:03] [debug] #65 00173b90 in ?? (0) from ASRP.amx
[20:39:03] [debug] #66 00173b90 in ?? (0) from ASRP.amx
[20:39:03] [debug] #67 00173b90 in ?? (0) from ASRP.amx
[20:39:03] [debug] #68 00173b90 in ?? (0) from ASRP.amx
[20:39:03] [debug] #69 00173b90 in ?? (0) from ASRP.amx
[20:39:03] [debug] #70 00173b90 in ?? (0) from ASRP.amx
[20:39:03] [debug] #71 00173b90 in ?? (0) from ASRP.amx
[20:39:03] [debug] #72 00173b90 in ?? (0) from ASRP.amx
[20:39:03] [debug] #73 00173b90 in ?? (0) from ASRP.amx
[20:39:03] [debug] #74 00173b90 in ?? (0) from ASRP.amx
[20:39:03] [debug] #75 00173b90 in ?? (0) from ASRP.amx
[20:39:03] [debug] #76 00173b90 in ?? (0) from ASRP.amx
[20:39:03] [debug] #77 00173b90 in ?? (0) from ASRP.amx
[20:39:03] [debug] #78 00173b90 in ?? (0) from ASRP.amx
[20:39:03] [debug] #79 00173b90 in ?? (0) from ASRP.amx
[20:39:03] [debug] #80 00173b90 in ?? (0) from ASRP.amx
[20:39:03] [debug] #81 00173b90 in ?? (0) from ASRP.amx
[20:39:03] [debug] #82 00173b90 in ?? (0) from ASRP.amx
[20:39:03] [debug] #83 00173b90 in ?? (0) from ASRP.amx
[20:39:03] [debug] #84 00173b90 in ?? (0) from ASRP.amx
[20:39:03] [debug] #85 00173b90 in ?? (0) from ASRP.amx
[20:39:03] [debug] #86 00173b90 in ?? (0) from ASRP.amx
[20:39:03] [debug] #87 00173b90 in ?? (0) from ASRP.amx
[20:39:03] [debug] #88 00173b90 in ?? (0) from ASRP.amx
[20:39:03] [debug] #89 00173b90 in ?? (0) from ASRP.amx
[20:39:03] [debug] #90 00173b90 in ?? (0) from ASRP.amx
[20:39:03] [debug] #91 00173b90 in ?? (0) from ASRP.amx
[20:39:03] [debug] #92 00173b90 in ?? (0) from ASRP.amx
[20:39:03] [debug] #93 00173b90 in ?? (0) from ASRP.amx
[20:39:03] [debug] #94 00173b90 in ?? (0) from ASRP.amx
[20:39:03] [debug] #95 00173b90 in ?? (0) from ASRP.amx
[20:39:03] [debug] #96 00173b90 in ?? (0) from ASRP.amx
[20:39:03] [debug] #97 00173b90 in ?? (0) from ASRP.amx
[20:39:03] [debug] #98 00173b90 in ?? (0) from ASRP.amx
[20:39:03] [debug] #99 00173b90 in ?? (0) from ASRP.amx
[20:39:03] [debug] #100 00173b90 in public OnPlPa_OnPlayerSpawn (0) from ASRP.amx
[20:39:03] [debug] #101 native CallLocalFunction () from samp-server.exe
[20:39:03] [debug] #102 0002a480 in ?? (0) from ASRP.amx
[20:39:03] [debug] #103 00007f44 in public OnPlayerSpawn (0) from ASRP.amx

Neke slike/video za lakse dobivanje pomoci(neobavezno): //
    ~ Member since: 09.13.2013. - 15:30 ~

To je i mn bilo na tom modu idi ppet compile.

Ja pravi novi ASRP :D nije ovo stari....
    ~ Member since: 09.13.2013. - 15:30 ~

Probaj to ukucati na google i vidi sta ostali kazu.

To javlja kad skripta ima dosta lokalnih varijabli, tako je kazao čika Y_Less koliko se sjećam u jednoj temi na samp forumu, nemoj me uzimati za riječ

"They have computers, and they may have other weapons of mass destruction."

Jel moze to da naskodi skripti ???
    ~ Member since: 09.13.2013. - 15:30 ~

Gledaj svaki kod koji nije dobro napravljen moze na neki nacin da naskodi skriptu npr usporavanje, to se ne primjeti ako imas malo gresaka.Dok sa vecim brojem dolazi do cestih lagova na serveru.Jer optimizacija koda je jako bitna, ako ne znas kako sta i kad koristit problem je.
Evo npr. osoba je pravila tut na BSu za textdraw koji ce pokazivati novac iz banke i koristi tajmer svakih pola sec da se to prikaze, a jednostavno je mogao da to oradi preko onplayerupdate funckije i smanji bespotrebnu upotrebu tog tajmera.To sam ti dao za primjer samo, moras da znas tacno sta radis da bi ti kod bio bez greske.Tako da za odlično programiranje u PAWNu moras da imas znanje u C++/Cu jer je PAWNo baziran na tome.(Pawno je editor, koristio sam kao programski jezik..)

"They have computers, and they may have other weapons of mass destruction."

Ja sam korstio timer kada igraca lociram da se na svake pola sekunde ucitava njegova lokacija mislim da je od tada pocelo ovo izbacivati ali nisam siguran probcu sutra sad nisam na kompu.Mozes malo da mi objasnis kako i sta je optimizacija skripte nikada to nisam radio.
Poslednja Izmena: Januar 04, 2016, 23:25:42 POSLE PODNE od Scripter Braun
    ~ Member since: 09.13.2013. - 15:30 ~

Optimizacija skripte ti je sreÄ'ivanje koda i izbacivanje onog nepotrebnog, zasto svaki put definisati string npr kao
new stringa[128];
new stringb[128];
new stringc[128];
new stringd[128];


kad jednostavno mozes da koristis
new string[128];

u svim slucajevima.To ti je jedan od osnovnih primjera

Bio je tut tu na forumu o strinogvima i optimizaciji ako me dobro pamćenje služi.U kojem se govori da ljudi korsite
new string[256];

sto i jest istina u većini modova se koristi to, a najveci moguci output i input su 128 slova.

Probaj pretrazit u tutorijali ima negdje 99% tut o optimizaciji koda tako nesto

"They have computers, and they may have other weapons of mass destruction."

A ovaj timer sto sam ubacio da ucitava svake sekunde sta sa njim?
    ~ Member since: 09.13.2013. - 15:30 ~

Pa kao sto sam rekao, radiš jednu te istu stvar svake sekunde.To predstavlja neki mali lag kad jedan igrac radi ili nema laga nikako, ali kad 30 igraca u isto vrijeme koristi GPS to ce vec stvoriti veci lag, nadam se da me razumijes

"They have computers, and they may have other weapons of mass destruction."

Razmem znaci moram uraditi optimizaciju skripte koliko sam skontao da podesim string smanjim komandu itd.
    ~ Member since: 09.13.2013. - 15:30 ~

E zna neko kako da upalim ovo u scripti da mogu da pratim optimizaciju..
Pawn compiler 3.2.3664           Copyright (c) 1997-2006, ITB CompuPhase

Header size:           6220 bytes
Code size:          1174096 bytes
Data size:          2141768 bytes
Stack/heap size:      16384 bytes; estimated 
max. usage=4905 cells (19620 bytes)
Total requirements: 3338468 bytes

Poslednja Izmena: Januar 05, 2016, 12:53:18 POSLE PODNE od Scripter Braun
    ~ Member since: 09.13.2013. - 15:30 ~

napravis pawn.txt u pawno folder i u njega upises
-d3

zatim ides save as i save ga kao

pawn.cfg
Evo kako to treba izgledati http://prntscr.com/9mbyxj