Help me out..
#1

Here is some errors and i wanted to speak about other thing

When i have #define SendClientMessage2 Compiler stop working why ?
Код:
D:\My server\gamemodes\TDM_Script.pwn(799) : error 001: expected token: "-identifier-", but found "["
D:\My server\gamemodes\TDM_Script.pwn(800) : error 029: invalid expression, assumed zero
D:\My server\gamemodes\TDM_Script.pwn(800) : warning 215: expression has no effect
D:\My server\gamemodes\TDM_Script.pwn(800) : error 001: expected token: ";", but found ")"
D:\My server\gamemodes\TDM_Script.pwn(800) : error 029: invalid expression, assumed zero
D:\My server\gamemodes\TDM_Script.pwn(800) : fatal error 107: too many error messages on one line

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


5 Errors.
799 and 800 lines is

Код:
new playername[64], string[500];
GetPlayerName(playerid, playername, MAX_PLAYER_NAME);
Reply
#2

Give 5 lines under and above line of errors.
Reply
#3

Код:
public ShowDialogs(playerid)
{
799	new playername[64], string[500];
800	GetPlayerName(playerid, playername, MAX_PLAYER_NAME);
801   if (dini_Exists(AddDirFile(dir_userfiles, playername)))
802	{
803	        if(dini_Int(AddDirFile(dir_userfiles, playername), "adminlevel") >= 1)
804	        {
805		        format(string,sizeof(string),"{FFFFFF}The username {00997A}%s {FFFFFF}is {FF0000}protected.\n{FFFFFF}Please type in the password for this account below in order to login.\n\n{A6A6A6}If this is not your account, leave and reconnect to the server with a different username.", playername);
806				ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_PASSWORD, "Login*", string, "Login", "Quit");
807			}
808			else
809			{
810			    format(string,sizeof(string),"{FFFFFF}The username {00997A}%s {FFFFFF}is {00FF00}registered.\n{FFFFFF}Please type in the password for this account below in order to login.\n\n{A6A6A6}If this is not your account, leave and reconnect to the server with a different username.", playername);
811				ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_PASSWORD, "Login*", string, "Login", "Quit");
812			}
813	}
814	else
815	{
816	        format(string,sizeof(string),"{FFFFFF}The account {FF0000}%s {FFFFFF}is {FF0000}not registered.\n{FFFFFF}Please type in the password for this account below in order to register.", playername);
817			ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_PASSWORD, "Registering...",string, "Register", "Quit");
818	}
819 }
Reply
#4

How did you define SendClientMessage2? And does it actually do something (like a macro) or is it just a define because you got errors?
Reply
#5

It's just because i got undefined symbol "SendClientMessage2"
Reply
#6

I see. You need the real function then, not the define as that may cause all your problems.
Reply
#7

How to do it then ?
Reply
#8

I'm not sure but try this out.
PHP код:
new playername[64]; 
new 
string[500]; GetPlayerName(playeridplayernameMAX_PLAYER_NAME); 
How does the #define affect when the errors you have shown literally point to something else?
Reply
#9

No not working
Reply
#10

Just realized, you've got the syntax for GetPlayerName wrong.

PHP код:
new playername[MAX_PLAYER_NAME]; 
new 
string[500]; GetPlayerName(playeridplayernamesizeof(playername)); 
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)