Help with OnPlayerDeath - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Help with OnPlayerDeath (
/showthread.php?tid=316805)
Help with OnPlayerDeath [++rep] -
matute - 08.02.2012
Fixed
Respuesta: Help with OnPlayerDeath -
matute - 08.02.2012
Help please i really need this fixed
Re: Help with OnPlayerDeath -
Nonameman - 08.02.2012
String1's size is not enough, you put more than 24 characters into it.
And when you use format(), use it like:
pawn Код:
format(variable, sizeof(variable), "the string", ...);
If you use bigger number than the length of your string, in the place of sizeof(), it will crash.
Respuesta: Re: Help with OnPlayerDeath -
matute - 08.02.2012
Quote:
Originally Posted by Nonameman
String1's size is not enough, you put more than 24 characters into it.
And when you use format(), use it like:
pawn Код:
format(variable, sizeof(variable), "the string", ...);
If you use bigger number than the length of your string, in the place of sizeof(), it will crash.
|
Ok i will try now, but that can cause the whole server get bugged ?
Re: Help with OnPlayerDeath -
Nonameman - 08.02.2012
I don't think so, but give it a try.

Run through the whole code, you may find other problems that could cause crashes and bugs.
Try not to use numbers at all, when you put the length of a string, sizeof(...) is the best way to do it, when the size of the string changes, it changes too.
Re: Help with OnPlayerDeath -
matute - 08.02.2012
thanks it seems to work now

And thanks for the tip about sizeof(..)