Forum

> > CS2D > Scripts > Script make cs2d quit 0.o ?
Forums overviewCS2D overview Scripts overviewLog in to reply

English Script make cs2d quit 0.o ?

9 replies
To the start Previous 1 Next To the start

old Script make cs2d quit 0.o ?

Kirito2K
User Off Offline

Quote
Hi all ,
I just was editing my script and there isn't any error when i opened it but i just chose a class and i spawned then cs2d quit .
Script >

old Re: Script make cs2d quit 0.o ?

Inflexion
User Off Offline

Quote
Suggestion (only);

I've clearly edited if player then ...
and about the exit..

1
2
3
4
5
if title == "Shop Menu" then
          if buton == 1 then
                    if player(id,"money") > 5000 then
                         equip(id,77,87)
                         removemoney(id,5000)

And about the exit. there is any errors on the log, Dear PK.
Read the log first and see if there is any error.

if it's an expection access violation. it's mean that the problem is on the things that u've writed.

@user Kirito2K: Try the things I suggested you.

old Re: Script make cs2d quit 0.o ?

Kirito2K
User Off Offline

Quote
@user Inflexion: Any way thanks i tried to fix it and i found the bug and there isn't any error came in the console
The edited script. >


The problem was in some funaction , it was _spawn , just take a look on the old and on this one .

old Re: Script make cs2d quit 0.o ?

MikuAuahDark
User Off Offline

Quote
Try running it from cs2d_dedicated and join 127.0.0.1 but start cs2d_dedicated from command prompt because cs2d_dedicated sometimes gives more information.

old Re: Script make cs2d quit 0.o ?

VADemon
User Off Offline

Quote
How to debug:
1) set cs2d cmd logbatch to 1
2) put as many print()'s in your code as possible, so you know where to search in the next step
3) after crashing check the game log. the latest printed line will show the approximate lines where the code causes CS2D to crash

old Re: Script make cs2d quit 0.o ?

Kirito2K
User Off Offline

Quote
I just understand where is the error .
It was in _spawn funaction , becuase when some one spawn he will get his old class and he will respawn and that make infinity spawning of that player, which that makes the cs2d quit .

Have any one understand me now ?
To the start Previous 1 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview