Server crash
#1

On this tutorial.
After a minute the whole server crash. That's all need to say.
Hope someone can help me
Reply
#2

Maybe post your code? The code that you added as in whatever you added to your script with that tutorial.
Reply
#3

Quote:
Originally Posted by lavamike
Maybe post your code? The code that you added as in whatever you added to your script with that tutorial.
pawn Код:
new RandomMSG[] =
{
  "Random Message 1",
  "Random Message 2",
  "Random Message 3"
};

forward SendMSG();

public OnGameModeInit()
{
   SetTimer("SendMSG", 60000, true);
   // 60000ms = 60 seconds = 1 minute
}

public SendMSG()
{
  new randMSG = random(sizeof(RandomMSG)); //calculates the size of RandomMSG (which is 3)
  SendClientMessageToAll(COLOR, RandomMSG[randMSG]); // Replace the "color" with your defined color.
}
Better? It's copy/Paste from the tutorial..
Reply
#4

Код:
SendClientMessageToAll(COLOR, RandomMSG[randMSG]); // Replace the "color" with your defined color.
Have you defined COLOR?
Reply
#5

Quote:
Originally Posted by ferriswheel
Код:
SendClientMessageToAll(COLOR, RandomMSG[randMSG]); // Replace the "color" with your defined color.
Have you defined COLOR?
Yes, OTHERWISE THE PWN SOURCE WON'T COMPILE. And my server crashes, as I said, so my pwn file IS compiled.

BTW: I have blue for that, if you want to know.
Reply
#6

It need to be a two dimensional array (I've fixed it in the wiki now.)
Reply
#7

Quote:
Originally Posted by 0rb
It need to be a two dimensional array
So, the tutorial is bugged? And what can i do to make it working?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)