Error | Name?
#1

Код:
// Check if that other player is online
						if (IsPlayerConnected(OtherPlayer))
						{
							// Get the location of the other player
							GetPlayerPos(OtherPlayer, x, y, z);
							IntID = GetPlayerInterior(OtherPlayer);
							WorldID = GetPlayerVirtualWorld(OtherPlayer);
							// Port the player to the given location
							SetPlayerVirtualWorld(playerid, WorldID);
							SetPlayerInterior(playerid, IntID);
							SetPlayerPos(playerid, x, y, z + 3.0);
							// Let the player know about it
							GetPlayerName(playerid,Name,sizeof(Name));
							format(PortMsg, 128, "{FFCC00}You have been tele-ported player: %s", Name);
							SendClientMessage(playerid, 0x00FF00FF, PortMsg);
						}
error:
Код:
E:\WOT\gamemodes\555.pwn(14451) : error 017: undefined symbol "Name"
E:\WOT\gamemodes\555.pwn(14451) : error 017: undefined symbol "Name"
E:\WOT\gamemodes\555.pwn(14451) : error 029: invalid expression, assumed zero
E:\WOT\gamemodes\555.pwn(14451) : 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
#2

pawn Код:
new Name[21];
GetPlayerName(OtherPlayer, Name, sizeof (Name));
format(PortMsg, 64, "{FFCC00}You have been tele-ported player: %s", Name);
SendClientMessage(playerid, 0x00FF00FF, PortMsg);
Reply
#3

Thanks dude.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)