Help me out.. - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Help me out.. (
/showthread.php?tid=577395)
Help me out.. -
KamalBa - 11.06.2015
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);
Re: Help me out.. -
Huba - 11.06.2015
Give 5 lines under and above line of errors.
Re: Help me out.. -
KamalBa - 11.06.2015
Код:
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 }
Re: Help me out.. -
mamorunl - 11.06.2015
How did you define SendClientMessage2? And does it actually do something (like a macro) or is it just a define because you got errors?
Re: Help me out.. -
KamalBa - 11.06.2015
It's just because i got undefined symbol "SendClientMessage2"
Re: Help me out.. -
mamorunl - 11.06.2015
I see. You need the real function then, not the define as that may cause all your problems.
Re: Help me out.. -
KamalBa - 11.06.2015
How to do it then ?
Re: Help me out.. -
SpaceX - 11.06.2015
I'm not sure but try this out.
PHP код:
new playername[64];
new string[500]; GetPlayerName(playerid, playername, MAX_PLAYER_NAME);
How does the #define affect when the errors you have shown literally point to something else?
Re: Help me out.. -
KamalBa - 11.06.2015
No not working
Re: Help me out.. -
SpaceX - 11.06.2015
Just realized, you've got the syntax for GetPlayerName wrong.
PHP код:
new playername[MAX_PLAYER_NAME];
new string[500]; GetPlayerName(playerid, playername, sizeof(playername));