PlayerName
#1

Hello,I have a little problem with stock:

Код:
D:\SAMP\Director Nou\gamemodes\TDM.pwn(318) : error 017: undefined symbol "PlayerName"
D:\SAMP\Director Nou\gamemodes\TDM.pwn(324) : error 017: undefined symbol "SAVE_PATH"
D:\SAMP\Director Nou\gamemodes\TDM.pwn(340) : error 017: undefined symbol "PlayerName"
D:\SAMP\Director Nou\gamemodes\TDM.pwn(342) : error 017: undefined symbol "SAVE_PATH"
D:\SAMP\Director Nou\gamemodes\TDM.pwn(373) : error 017: undefined symbol "PlayerName"
D:\SAMP\Director Nou\gamemodes\TDM.pwn(389) : error 017: undefined symbol "PlayerName"
D:\SAMP\Director Nou\gamemodes\TDM.pwn(403) : error 017: undefined symbol "PlayerName"
D:\SAMP\Director Nou\gamemodes\TDM.pwn(423) : error 017: undefined symbol "PlayerName"
D:\SAMP\Director Nou\gamemodes\TDM.pwn(433) : error 017: undefined symbol "PlayerName"
D:\SAMP\Director Nou\gamemodes\TDM.pwn(466) : error 017: undefined symbol "strtok"
D:\SAMP\Director Nou\gamemodes\TDM.pwn(466) : error 033: array must be indexed (variable "cmd")
D:\SAMP\Director Nou\gamemodes\TDM.pwn(476) : error 017: undefined symbol "strtok"
D:\SAMP\Director Nou\gamemodes\TDM.pwn(476) : error 033: array must be indexed (variable "tmp")
D:\SAMP\Director Nou\gamemodes\TDM.pwn(483) : error 017: undefined symbol "ReturnUser"
D:\SAMP\Director Nou\gamemodes\TDM.pwn(484) : error 017: undefined symbol "strtok"
D:\SAMP\Director Nou\gamemodes\TDM.pwn(484) : error 033: array must be indexed (variable "tmp")
D:\SAMP\Director Nou\gamemodes\TDM.pwn(516) : error 017: undefined symbol "strtok"
D:\SAMP\Director Nou\gamemodes\TDM.pwn(516) : error 033: array must be indexed (variable "tmp")
D:\SAMP\Director Nou\gamemodes\TDM.pwn(517) : error 017: undefined symbol "ReturnUser"
D:\SAMP\Director Nou\gamemodes\TDM.pwn(541) : error 017: undefined symbol "PlayerName"
D:\SAMP\Director Nou\gamemodes\TDM.pwn(554) : error 017: undefined symbol "strtok"
D:\SAMP\Director Nou\gamemodes\TDM.pwn(554) : error 033: array must be indexed (variable "tmp")
D:\SAMP\Director Nou\gamemodes\TDM.pwn(555) : error 017: undefined symbol "ReturnUser"
D:\SAMP\Director Nou\gamemodes\TDM.pwn(579) : error 017: undefined symbol "PlayerName"
D:\SAMP\Director Nou\gamemodes\TDM.pwn(588) : error 017: undefined symbol "strtok"
D:\SAMP\Director Nou\gamemodes\TDM.pwn(588) : error 033: array must be indexed (variable "tmp")
I've put this code at the end of the game:
Код:
stock PlayerName(playerid)
{
	new name[MAX_PLAYER_NAME];
	GetPlayerName(playerid,name,sizeof(name));
	return name;
}
And I use SII.inc
Reply
#2

Try this one:

Код:
stock PlayerName(playerid) {
  new name[255];
  GetPlayerName(playerid, name, 255);
  return name;
}
Reply
#3

same
Reply
#4

This error is not in stock, this error is lack of definition of variables in the lines quoted.
Reply
#5

But in the lines all is ok..
Reply
#6

You're right,[HLF]Southclaw...

But I have another problem:
Код:
public OnPlayerUpdate(playerid)
{
    if(pStats[playerid][Kills] == 50)
	{
	    SendClientMessage(playerid,COLOR_LIGHTBLUE,"INFO: Because you made 50 kils you have been promoted to Rank 2 !");
	    new string[128];
	    format(string,128,"INFO: %s has made 50 kills and has been promoted to Rank 2 !",PlayerName(playerid));
	    SendClientMessageToAll(COLOR_LIGHTBLUE,string);
	    pStats[playerid][Rank] = 2;
	}
if(!IsPlayerConnected(playerid)) return 0;

    if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
    {
        for(new i = 0; i < sizeof(SpikeInfo); i++)
  	    {
  	        if(IsPlayerInRangeOfPoint(playerid, 3.0, SpikeInfo[i][sX], SpikeInfo[i][sY], SpikeInfo[i][sZ]))
            {
  	            if(SpikeInfo[i][sCreated] == 1)
  	            {
  	                new panels, doors, lights, tires;
  	                new carid = GetPlayerVehicleID(playerid);
		            GetVehicleDamageStatus(carid, panels, doors, lights, tires);
		            tires = encode_tires(1, 1, 1, 1);
		            UpdateVehicleDamageStatus(carid, panels, doors, lights, tires);
  	                return 0;
  	            }
  	        }
       }
  	}

	return 1;
}
And I want to delete this:
Код:
if(!IsPlayerConnected(playerid)) return 0;

    if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
    {
        for(new i = 0; i < sizeof(SpikeInfo); i++)
  	    {
  	        if(IsPlayerInRangeOfPoint(playerid, 3.0, SpikeInfo[i][sX], SpikeInfo[i][sY], SpikeInfo[i][sZ]))
            {
  	            if(SpikeInfo[i][sCreated] == 1)
  	            {
  	                new panels, doors, lights, tires;
  	                new carid = GetPlayerVehicleID(playerid);
		            GetVehicleDamageStatus(carid, panels, doors, lights, tires);
		            tires = encode_tires(1, 1, 1, 1);
		            UpdateVehicleDamageStatus(carid, panels, doors, lights, tires);
  	                return 0;
  	            }
  	        }
       }
  	}
and i get the follow errors
Код:
D:\SAMP\Director Nou\gamemodes\TDM.pwn(318) : error 017: undefined symbol "PlayerName"
D:\SAMP\Director Nou\gamemodes\TDM.pwn(324) : error 017: undefined symbol "SAVE_PATH"
D:\SAMP\Director Nou\gamemodes\TDM.pwn(340) : error 017: undefined symbol "PlayerName"
D:\SAMP\Director Nou\gamemodes\TDM.pwn(342) : error 017: undefined symbol "SAVE_PATH"
D:\SAMP\Director Nou\gamemodes\TDM.pwn(373) : error 017: undefined symbol "PlayerName"
D:\SAMP\Director Nou\gamemodes\TDM.pwn(389) : error 017: undefined symbol "PlayerName"
D:\SAMP\Director Nou\gamemodes\TDM.pwn(403) : error 017: undefined symbol "PlayerName"
D:\SAMP\Director Nou\gamemodes\TDM.pwn(423) : error 017: undefined symbol "PlayerName"
D:\SAMP\Director Nou\gamemodes\TDM.pwn(433) : error 017: undefined symbol "PlayerName"
D:\SAMP\Director Nou\gamemodes\TDM.pwn(873) : error 017: undefined symbol "PlayerName"
D:\SAMP\Director Nou\gamemodes\TDM.pwn(907) : error 079: inconsistent return types (array & non-array)
D:\SAMP\Director Nou\gamemodes\TDM.pwn(910) : error 079: inconsistent return types (array & non-array)
D:\SAMP\Director Nou\gamemodes\TDM.pwn(911) : error 017: undefined symbol "SAVE_PATH"
D:\SAMP\Director Nou\gamemodes\TDM.pwn(934) : error 002: only a single statement (or expression) can follow each "case"
D:\SAMP\Director Nou\gamemodes\TDM.pwn(934) : error 004: function "OnPlayerClickPlayer" is not implemented
D:\SAMP\Director Nou\gamemodes\TDM.pwn(936) : error 079: inconsistent return types (array & non-array)
D:\SAMP\Director Nou\gamemodes\TDM.pwn(939) : warning 225: unreachable code
D:\SAMP\Director Nou\gamemodes\TDM.pwn(939) : error 029: invalid expression, assumed zero
D:\SAMP\Director Nou\gamemodes\TDM.pwn(939) : error 017: undefined symbol "PlayerName"
D:\SAMP\Director Nou\gamemodes\TDM.pwn(942) : error 090: public functions may not return arrays (symbol "OnDialogResponse")
D:\SAMP\Director Nou\gamemodes\TDM.pwn(944) : warning 225: unreachable code
D:\SAMP\Director Nou\gamemodes\TDM.pwn(944) : error 029: invalid expression, assumed zero
D:\SAMP\Director Nou\gamemodes\TDM.pwn(944) : error 017: undefined symbol "SAVE_PATH"
D:\SAMP\Director Nou\gamemodes\TDM.pwn(949) : error 090: public functions may not return arrays (symbol "OnDialogResponse")
D:\SAMP\Director Nou\gamemodes\TDM.pwn(951) : warning 225: unreachable code
D:\SAMP\Director Nou\gamemodes\TDM.pwn(951) : error 029: invalid expression, assumed zero
D:\SAMP\Director Nou\gamemodes\TDM.pwn(951) : error 017: undefined symbol "udb_hash"
D:\SAMP\Director Nou\gamemodes\TDM.pwn(952) : error 017: undefined symbol "buf"
D:\SAMP\Director Nou\gamemodes\TDM.pwn(958) : error 017: undefined symbol "buf"
Reply
#7

Look, I did not read through all of your code. It's just that you should not. YOU SHOULD NOT. Post that stuff under OnPlayerUpdate.
Reply
#8

Thanks,you're the best..

All is Ok..but I have problem with login dialog..Is Ok..when I register on the server shows to me to login,and when I quit the game and I enter the server the login box does not appare..But my .ini file is saved in scriptfile

I use that:

Код:
if (RegistrationStep[playerid] == 0 && gPlayerLogged[playerid] == 1)
	{
		if (gPlayerAccount[playerid] == 1)
		{
			new loginstring[128];
			new loginname[64];
			GetPlayerName(playerid,loginname,sizeof(loginname));
			format(loginstring,sizeof(loginstring),"{FFFFFF}» Bine ai venit, {FFAF00}%s\n» {FFFFFF}Acest nume este inregistrat.\n» Poti sa te loghezi:",loginname);
			ShowPlayerDialog(playerid,12346,DIALOG_STYLE_INPUT,"Login",loginstring,"Login","Exit");
		}
		else
		{
			gPlayerAccount[playerid] = 0;
 			new regstring[128];
			new regname[64];
			GetPlayerName(playerid,regname,sizeof(regname));
			format(regstring,sizeof(regstring),"{FFFFFF}» Bun benit, {FFAF00}%s\n» {FFFFFF}Nu ai cont.\n» Te rog sa te inregistrezi:",regname);
			ShowPlayerDialog(playerid,12345,DIALOG_STYLE_INPUT,"Register",regstring,"Register","Exit");
			RegistrationStep[playerid] = 1;
			gPlayerAccount[playerid] = 1;
		}
	}
This is positioned at the begin of OnPlayerRequestClass..
Reply


Forum Jump:


Users browsing this thread: 4 Guest(s)