Codes crashing the server - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Codes crashing the server (
/showthread.php?tid=65762)
Codes crashing the server -
Cevarr - 16.02.2009
I posted this in another topic but I think i can draw more attention to it here as its a scripting issue.
pawn Код:
if (strcmp("/advertise", cmdtext, true, 10) == 0 || strcmp("/ad",cmdtext, true, 10) == 0)
{
new string[128];
format(string, sizeof(string), "Advertisement - %s: %s",playerid);
SendClientMessageToAll(0xFFFFFFAA, string);
SendClientMessage(playerid,0xFFFFFFAA,"You were charged $1000 for advertising.");
return 1;
}
if (strcmp("/sanews",cmdtext,true,10) == 0)
{
if (GetPlayerSkin(playerid) == 150 || GetPlayerSkin(playerid) == 240 || GetPlayerSkin(playerid) == 59)
if (PlayerToPoint(3.0,playerid,1042.2433,10.1764,1001.2845))
{
new string[128];
format(string, sizeof(string), "San Andreas News - Reporter %s: %s",playerid);
SendClientMessageToAll(0xFFFFFFAA, string);
}
else
{
SendClientMessage(playerid,0xFFFFFFAA,"SERVER: You must be at the correct location to broadcast news, as well as being an official San Andreas News Reporter!");
}
return 1;
}
Sorry for bad indentation
can anyone identify any problem?
Re: Codes crashing the server -
[HiC]TheKiller - 16.02.2009
pawn Код:
format(string, sizeof(string), "Advertisement - %s: %s",playerid);
What do you plan to achive with that?
Maybe
pawn Код:
format(string, sizeof(string), "Advertisement - %d: %s",playerid,playerid);
But that is pointless...
Re: Codes crashing the server -
Cevarr - 16.02.2009
lol, anymore ideas then? :P
Re: Codes crashing the server -
Robbin237 - 16.02.2009
First tell us your problem, ident your shit, then we'll have a look.
Re: Codes crashing the server -
Cevarr - 16.02.2009
EDIT: Thanks, the first reply helped, fixed now