zero ereur crash
#1

hi can you please correct code it will compile well 0ereur/warning but it is my samp server crash at startup


Код:
	dcmd(listrace,8,cmdtext);



dcmd_listbiz(playerid, params[])
{
  #pragma unused params
	new tmp[128], i = 0;
	do
	{
	  i++;
	  format(tmp, sizeof(tmp), "%03d.biz", i);
	}
	while(fexist(tmp));
	format(tmp, sizeof(tmp), "Ton serveur possиde %d biz.", i-1);
	SendClientMessage(playerid, GREEN, tmp);
}
pleasse
Reply
#2

Код:
	
	do
erm, what's this for?

-Skeed
Reply
#3

is a loop;


can someone help me?
Reply
#4

is this correct?

Код:
format(tmp, sizeof(tmp), "%03d.biz", i);
or should it be like this:

Код:
format(tmp, sizeof(tmp), "%d.biz", i);
Reply
#5

not because it's my file as s'apellle its 001.biz 002.biz 003.biz 004.biz 005.biz ...

but its just that COMPILE WELL samp launch a crash and when they run the fs


Reply
#6

Quote:
Originally Posted by Mr_C30
not because it's my file as s'apellle its 001.biz 002.biz 003.biz 004.biz 005.biz ...

but its just that COMPILE WELL samp launch a crash and when they run the fs


Shouldn't it be like this then:

Код:
format(tmp, sizeof(tmp), "00%d.biz", i);
If this is wrong, script can't open file and that's because it crash.
Reply
#7

ok I change but its always crash :/
Reply
#8

ey I thought, code of origin and then is good walking in this form=

Код:
	if(strcmp(cmdtext, "/test", true) == 0)
	{
		new tmp[128], i = 0;
		do
		{
		  i++;
		  format(tmp, sizeof(tmp), "%03d.biz", i);
		}
		while(fexist(tmp));
		format(tmp, sizeof(tmp), "Ton serveur possиde %d biz.", i-1);
	  SendClientMessage(playerid, COLOR,tmp);
	}
but in the form of his early crash :/



pleasse hellp my
Reply
#9

If your SAMP crashes on startup, then maybe the problem isn't a command?
Reply
#10

if I just withdraw to code .... and everything works well



please
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)