Can't Figure These Errors Out!!!
#1

So we did not even TOUCH anything to do with this from what I know, yet it gives us these errors and we had no problem with it in the past. If any other info is needed it shall be provided. Thanks in advance.

Код:
C:\Users\Administrator\Desktop\Project X SAMP Server\gamemodes\PXRP.pwn(1389) : error 012: invalid function call, not a valid address
C:\Users\Administrator\Desktop\Project X SAMP Server\gamemodes\PXRP.pwn(1389) : error 029: invalid expression, assumed zero
C:\Users\Administrator\Desktop\Project X SAMP Server\gamemodes\PXRP.pwn(1389) : warning 215: expression has no effect
C:\Users\Administrator\Desktop\Project X SAMP Server\gamemodes\PXRP.pwn(1389) : warning 215: expression has no effect
C:\Users\Administrator\Desktop\Project X SAMP Server\gamemodes\PXRP.pwn(1389) : error 001: expected token: ";", but found ")"
C:\Users\Administrator\Desktop\Project X SAMP Server\gamemodes\PXRP.pwn(1389) : 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

Can you post the line: 1389?
Reply
#3

Posted.
Reply
#4

can you "Paste" it
Reply
#5

Here is the entire "thingy madoodle" :3

Код:
forward MessageToSSChat(color,const string[]);
public MessageToSSChat(color,const string[])
{
	for(new i = 0; i < MAX_PLAYERS; i++)
	{
		if(IsPlayerConnected(i) == 1)
		{
			if((strcmp(ReturnPlayerName(i),"Joseph_Stryker",true) == 0)
			|| (strcmp(ReturnPlayerName(i),"Josh_Rolen",true) == 0)
			|| PlayerInfo[i][SSMember] >= 1)
			{
				SendClientMessage(i, color, string);
			}
		}
	}
	return 1;
}
Just refer to the pic for the line. 1389 is: if((strcmp(ReturnPlayerName(i),"Joseph_Stryker",tr ue) == 0)
Reply
#6

pawn Код:
if(strcmp(ReturnPlayerName(i), "Joseph_Stryker", true) == 0
        || strcmp(ReturnPlayerName(i), "Josh_Rolen", true) == 0
        || PlayerInfo[i][SSMember] >= 1)
Reply
#7

Код:
C:\Users\Administrator\Desktop\Project X SAMP Server\gamemodes\PXRP.pwn(1389) : error 017: undefined symbol "playerid"
C:\Users\Administrator\Desktop\Project X SAMP Server\gamemodes\PXRP.pwn(1390) : warning 215: expression has no effect
C:\Users\Administrator\Desktop\Project X SAMP Server\gamemodes\PXRP.pwn(1390) : error 001: expected token: ";", but found ")"
C:\Users\Administrator\Desktop\Project X SAMP Server\gamemodes\PXRP.pwn(1390) : error 029: invalid expression, assumed zero
C:\Users\Administrator\Desktop\Project X SAMP Server\gamemodes\PXRP.pwn(1390) : error 029: invalid expression, assumed zero
C:\Users\Administrator\Desktop\Project X SAMP Server\gamemodes\PXRP.pwn(1390) : fatal error 107: too many error messages on one line
*rips own hair out* Any other suggestions?
Reply
#8

Will fix the errors
pawn Код:
forward MessageToSSChat(color, const string[]);
public MessageToSSChat(color, const string[])
{
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
        if(IsPlayerConnected(i) == 1)
        {
            if(strcmp(ReturnPlayerName(i), "Joseph_Stryker", true) == 0
            || strcmp(ReturnPlayerName(i), "Josh_Rolen", true) == 0
            || PlayerInfo[i][SSMember] >= 1)
            {
                SendClientMessage(i, color, string);
            }
        }
    }
    return 1;
}
Reply
#9

pawn Код:
forward MessageToSSChat(color,const string[]);
public MessageToSSChat(color,const string[]) {
    for(new i = 0; i < MAX_PLAYERS; i++) {
        if(IsPlayerConnected(i)) {
            new name[MAX_PLAYER_NAME]; GetPlayerName(i, name, sizeof(name));
            if(!strcmp(name, "Joseph_Stryker", true) || !strcmp(name, "Josh_Rolen", true) || PlayerInfo[i][SSMember] >= 1)
            {
                SendClientMessage(i, color, string);
            }
        }
    }
    return 0x01;
}
Try : p
Reply
#10

Well it keeps moving down, missing bracket maybe??
Code:
C:\Users\Administrator\Desktop\Project X SAMP Server\gamemodes\PXRP.pwn(1386) : warning 219: local variable "name" shadows a variable at a preceding level
C:\Users\Administrator\Desktop\Project X SAMP Server\gamemodes\PXRP.pwn(1400) : warning 219: local variable "name" shadows a variable at a preceding level
C:\Users\Administrator\Desktop\Project X SAMP Server\gamemodes\PXRP.pwn(1417) : error 012: invalid function call, not a valid address
C:\Users\Administrator\Desktop\Project X SAMP Server\gamemodes\PXRP.pwn(1417) : warning 215: expression has no effect
C:\Users\Administrator\Desktop\Project X SAMP Server\gamemodes\PXRP.pwn(1417) : error 001: expected token: ";", but found ")"
C:\Users\Administrator\Desktop\Project X SAMP Server\gamemodes\PXRP.pwn(1417) : error 029: invalid expression, assumed zero
C:\Users\Administrator\Desktop\Project X SAMP Server\gamemodes\PXRP.pwn(1417) : fatal error 107: too many error messages on one line
LINE 1417: if (udb_CheckLogin(ReturnPlayerName(playerid),inputte xt))
Reply
#11

HEre is that code:

HTML Code:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])  //the callback
{
    if (dialogid == 1) //checking dialogid
    {
        if (response == 1) //making sure "Login" was pressed
        {
            if (udb_CheckLogin(ReturnPlayerName(playerid),inputtext)) //checking if it is the players password
            {
		        PlayerInfo[playerid][Jailed] = (dUserINT(ReturnPlayerName(playerid)).("Jailed"));
		        PlayerInfo[playerid][Frozen] = (dUserINT(ReturnPlayerName(playerid)).("Frozen"));
				PLAYERLIST_authed[playerid]=true;
				TogglePlayerControllable(playerid, true);
				PlayerPlaySound(playerid,1057,0.0,0.0,0.0);
				return SendClientMessage(playerid,COLOR_MAIN,"{00ff00}[Server:] {dfebff} Successfully Authorized!");//SystemMsg(playerid,"Successfully authed!");
            }
            else //incorrect password
            {
			    new string[256];
				format(string,sizeof(string),"[!!Warning!!] Failed Login Attempt by %s Detected. Player may be attempting to steal someone's account.",ReturnPlayerName(playerid));
				for(new ra=0; ra<MAX_PLAYERS; ra++){
					if(IsPlayerAdmin(ra) || IsPlayerLAdmin(ra))
					{
						SendClientMessage(ra,COLOR_RED,string);
					}
				}
				ShowPlayerDialog(playerid, 1, DIALOG_STYLE_INPUT, "Invalid Password", "Invalid Password, try again", "Login", "Cancel");
			    return SendClientMessage(playerid,red,"{ff0000}[Warning:] {dfebff} Login Failed!");
            }
        }
        else //pressed "Cancel"
        {
            SendClientMessage(playerid,red,"{00ff00}[Server:] {dfebff} Please use /login [password] or reconnect and try again.");
        }
    }
    else if(dialogid == 2) //namechange dialog
    {
        //ShowPlayerDialog(playerid, 2, DIALOG_STYLE_INPUT, "Name Change", "Incorrect Name, please retry.\nExample: John_Smith or Jane_Smith", "accept", "cancel");
        if (response == 1)
        {
			//new PName[MAX_PLAYER_NAME];
			//GetPlayerName(playerid,PName,sizeof(PName));
		    new namestring = strfind(inputtext, "_", true);
		 	if(namestring == -1)
			{//incorrect name
                ShowPlayerDialog(playerid, 2, DIALOG_STYLE_INPUT, "Name Change", "Invalid Name, please retry.\nExample: John_Smith or Jane_Smith", "accept", "cancel");
			    return SendClientMessage(playerid,red,"{ff0000}[Error:] {dfebff} Name Change Failed!");
			}
			else
			{//correct name
				PLAYERLIST_authed[playerid]=true;
				TogglePlayerControllable(playerid, true);
				PlayerPlaySound(playerid,1057,0.0,0.0,0.0);
				SetPlayerName(playerid, inputtext);
				OnPlayerConnect(playerid);
				return SendClientMessage(playerid,COLOR_MAIN,"{00ff00}[Server:] {dfebff} Successfully Authorized! Welcome!");//SystemMsg(playerid,"Successfully authed!");

			}
        }
        else //pressed "Cancel"
        {
            SendClientMessage(playerid,red,"{ff0000}[Warning:] {dfebff} Please relog to the server with an RP name. Example: John_Doe or Jane_Doe.");
			PlayerInfo[playerid][TimeX] = 0;
			Kick(playerid);

        }


    }
Reply
#12

It obviously wants a semicolon somewhere, but where is the question. Where it's pointing to put the semicolon is irrelevant to the error message. I'm confused. xD
Reply
#13

can we see your ReturnPlayerName() ? its in each bugging line - suspect #1...
Reply
#14

(ReturnPlayerName(playerid)

^^ That?

..Sorry, I'm a scripting n00b you may need to explain a few things that should be quite obvious XD
Reply
#15

The function of ReturnPlayerName is what he meant. By the looks of it, you have more than one function that is checking for the players name because you have two variables of the same name colliding. Other than that, you typed a mistake into your function which caused it to fuck itself over.
Reply
#16

So how in the hell do I fix it D: It has been working fine before...it just suddenly gave me this error.
Reply
#17

Find the function ReturnPlayerName and post it here like I stated in my post above.
Reply
#18

pawn Code:
enum info
{
    SSMember,
}

new PlayerInfo[MAX_PLAYERS][info];

forward MessageToSSChat(color,const string[]);
public MessageToSSChat(color,const string[])
{
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
        if(IsPlayerConnected(i) == 1)
        {
            if((strcmp(ReturnPlayerName(i),"Joseph_Stryker",true) == 0) || (strcmp(ReturnPlayerName(i),"Josh_Rolen",true) == 0) || (PlayerInfo[i][SSMember] >= 1))
            {
                SendClientMessage(i, color, string);
            }
        }
    }
    return 1;
}

stock ReturnPlayerName(playerid)
{
    new name[24];
    GetPlayerName(playerid, name, 24);
    return name;
}
No errors in this one. xD
Reply
#19

Quote:
Originally Posted by Ricop522
Посмотреть сообщение
pawn Код:
forward MessageToSSChat(color,const string[]);
public MessageToSSChat(color,const string[]) {
    for(new i = 0; i < MAX_PLAYERS; i++) {
        if(IsPlayerConnected(i)) {
            new name[MAX_PLAYER_NAME]; GetPlayerName(i, name, sizeof(name));
            if(!strcmp(name, "Joseph_Stryker", true) || !strcmp(name, "Josh_Rolen", true) || PlayerInfo[i][SSMember] >= 1)
            {
                SendClientMessage(i, color, string);
            }
        }
    }
    return 0x01;
}
Try : p
Little fix
pawn Код:
forward MessageToSSChat(color,const string[]);
public MessageToSSChat(color,const string[]) {
    for(new i = 0; i < MAX_PLAYERS; i++) {
        if(IsPlayerConnected(i)) {
            new name[MAX_PLAYER_NAME]; GetPlayerName(i, name, sizeof(name));
            if((!strcmp(name, "Joseph_Stryker", true)) || (!strcmp(name, "Josh_Rolen", true)) || PlayerInfo[i][SSMember] >= 1)
            {
                SendClientMessage(i, color, string);
            }
        }
    }
    return 0x01;
}
or was it like this:
if(!(strcmp(name, "Joseph_Stryker", true)) || !(strcmp(name, "Josh_Rolen", true)) || PlayerInfo[i][SSMember] >= 1)
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)