Welcome message crash
#1

anyone know why my server crashes after the "Remeber the server is still in development!."

Код:
public OnPlayerConnect(playerid)
{
	new pname[24], string[128];
  GetPlayerName(playerid, pname, sizeof(pname));
  format(string, sizeof(string), "Welcome to Everything World %s!", pname);
  	SendClientMessage(playerid,COLOR_RED, string);
  	SendClientMessage(playerid,COLOR_BLUE, "Remeber the server is still in development!.");
  	new pnamee[24], stringg[128];
  GetPlayerName(playerid, pnamee, sizeof(pnamee));
  format(stringg, sizeof(stringg), "%s!", pnamee);
  	SendClientMessage(playerid,COLOR_YELLOW, "[Server] %s has joined the server, Welcome %s !");
	return 1;
}
Reply
#2

pawn Код:
public OnPlayerConnect(playerid)
{
  new pname[24],
    string[128];
  GetPlayerName(playerid,pname,sizeof(pname));
  format(string, sizeof(string), "Welcome to Everything World %s!",pname);
  SendClientMessage(playerid,COLOR_RED,string);
  SendClientMessage(playerid,COLOR_BLUE, "Remeber the server is still in development!.");
  GetPlayerName(playerid, pnamee, sizeof(pnamee));
  format(string,sizeof(string),"[Servre] %s has joined the server, Welcome %s !.",pnamee,pnamee);
  SendClientMessage(playerid,COLOR_YELLOW, string);
  return 1;
}
Reply
#3

C:\Users\user\Desktop\SA-MP Server Unreal Stuntages\Stunt City\gamemodes\EverythingWorldVersionOne.pwn(6 : error 017: undefined symbol "pnamee"
C:\Users\user\Desktop\SA-MP Server Unreal Stuntages\Stunt City\gamemodes\EverythingWorldVersionOne.pwn(6 : error 017: undefined symbol "pnamee"
C:\Users\user\Desktop\SA-MP Server Unreal Stuntages\Stunt City\gamemodes\EverythingWorldVersionOne.pwn(6 : error 029: invalid expression, assumed zero
C:\Users\user\Desktop\SA-MP Server Unreal Stuntages\Stunt City\gamemodes\EverythingWorldVersionOne.pwn(6 : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


4 Errors.
Reply
#4

Quote:
Originally Posted by [mad
MLK (sampx-hosting.co.cc) ]
anyone know why my server crashes after the "Remeber the server is still in development!."

Код:
public OnPlayerConnect(playerid)
{
	new pname[24], string[128];
  GetPlayerName(playerid, pname, sizeof(pname));
  format(string, sizeof(string), "Welcome to Everything World %s!", pname);
 	SendClientMessage(playerid,COLOR_RED, string);
 	SendClientMessage(playerid,COLOR_BLUE, "Remeber the server is still in development!.");
 	new pnamee[24], stringg[128];
  GetPlayerName(playerid, pnamee, sizeof(pnamee));
  format(stringg, sizeof(stringg), "%s!", pnamee);
 	SendClientMessage(playerid,COLOR_YELLOW, "[Server] %s has joined the server, Welcome %s !");
	return 1;
}
Код:
public OnPlayerConnect(playerid)
{

  	new pnamee[24], stringg[128];
  GetPlayerName(playerid, pnamee, sizeof(pnamee));
  format(stringg, sizeof(stringg), "%s!", pnamee);
  	SendClientMessage(playerid,COLOR_YELLOW, "[Server] %s has joined the server, Welcome %s !");
	return 1;
}
It could be that part.

Try this (From Wiki)


Код:
  new pName[MAX_PLAYER_NAME];
  new string2[48];
  GetPlayerName(playerid, pName, sizeof(pName));
  format(string2, sizeof(string2), "%s has joined the server, Welcome %s", pName);
  SendClientMessageToAll(0xAAAAAAAA, string);
Reply
#5

Oh ops, it's pname, not pnamee.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)