4 Errors in one line.
#1

Hey guys,
firstly : Sorry for my bad english.
Now that what i want to know from you :
I have some errors in the same line and i don't know, what's wrong with it.
The Errors are :
dxtdm.pwn(157) : error 029: invalid expression, assumed zero
dxtdm.pwn(157) : error 029: invalid expression, assumed zero
dxtdm.pwn(157) : warning 215: expression has no effect
dxtdm.pwn(157) : error 001: expected token: ";", but found "]"
dxtdm.pwn(157) : fatal error 107: too many error messages on one line

The line is in OnPlayerDisconnect :
public OnPlayerDisconnect(playerid, reason)
{
new pname[MAX_PLAYERS],accFormat[128];
GetPlayerName(playerid,pname,sizeof pname);
format(accFormat,sizeof accFormat,"%s.user",pname);
if(fexist(accFormat) && Player[playerid][loggedin] == 1) //<-- The Error line
{
dini_IntSet(accFormat,"wanted",Player[playerid][wanted]);
dini_IntSet(accFormat,"skin",Player[playerid][skin]);
dini_IntSet(accFormat,"money",GetPlayerMoney(playe rid));
dini_IntSet(accFormat,"score",GetPlayerScore(playe rid));
dini_FloatSet(accFormat,"lastx",Player[playerid][lastx]);
dini_FloatSet(accFormat,"lasty",Player[playerid][lasty]);
dini_FloatSet(accFormat,"lastz",Player[playerid][lastz]);
}

Player[playerid][loggedin] = 0;
Player[playerid][wanted] = 0;
Player[playerid][skin] = 0;
Player[playerid][lastx] = (0.0);
Player[playerid][lasty] = (0.0);
Player[playerid][lastz] = (0.0);
return 1;
}


I hope you can help me.
I already asked in the german board, but they're all sleeping i think .
Reply
#2

Quote:
Originally Posted by DarthXela
Посмотреть сообщение
Hey guys,
firstly : Sorry for my bad english.
Now that what i want to know from you :
I have some errors in the same line and i don't know, what's wrong with it.
The Errors are :
dxtdm.pwn(157) : error 029: invalid expression, assumed zero
dxtdm.pwn(157) : error 029: invalid expression, assumed zero
dxtdm.pwn(157) : warning 215: expression has no effect
dxtdm.pwn(157) : error 001: expected token: ";", but found "]"
dxtdm.pwn(157) : fatal error 107: too many error messages on one line

The line is in OnPlayerDisconnect :
public OnPlayerDisconnect(playerid, reason)
{
new pname[MAX_PLAYERS],accFormat[128];
GetPlayerName(playerid,pname,sizeof pname);
format(accFormat,sizeof accFormat,"%s.user",pname);
Код:
	if(fexist(accFormat) && Player[playerid][loggedin] == 1) //<-- The Error line
	{
dini_IntSet(accFormat,"wanted",Player[playerid][wanted]);
dini_IntSet(accFormat,"skin",Player[playerid][skin]);
dini_IntSet(accFormat,"money",GetPlayerMoney(playe rid));
dini_IntSet(accFormat,"score",GetPlayerScore(playe rid));
dini_FloatSet(accFormat,"lastx",Player[playerid][lastx]);
dini_FloatSet(accFormat,"lasty",Player[playerid][lasty]);
dini_FloatSet(accFormat,"lastz",Player[playerid][lastz]);
}

Player[playerid][loggedin] = 0;
Player[playerid][wanted] = 0;
Player[playerid][skin] = 0;
Player[playerid][lastx] = (0.0);
Player[playerid][lasty] = (0.0);
Player[playerid][lastz] = (0.0);
return 1;
}


I hope you can help me.
I already asked in the german board, but they're all sleeping i think .
Replace this, with the error line: and tell me if works, or not:
Код:
if(fexist(accFormat) &&! Player[playerid][loggedin] == 1) //added (!)
{
Reply
#3

if(fexist(accFormat) && Player[playerid][loggedin] == 1))
or
if(fexist(accFormat) && Player[playerid][loggedin] == 1);
Reply
#4

No, they both do not work. Always the same errors.
Reply
#5

Try this:

PHP код:
if(fexist(accFormat) && Player[playerid][loggedin] == true
Reply
#6

Same Errors.
Reply
#7

pawn Код:
public OnPlayerDisconnect(playerid, reason)
{
    new pname[MAX_PLAYERS], accFormat[128];
    GetPlayerName(playerid,pname,sizeof pname);
    format(accFormat,sizeof(accFormat),"%s.user",pname);
    if(fexist(accFormat) && Player[playerid][loggedin] == 1)
    {
        dini_IntSet(accFormat,"wanted",Player[playerid][wanted]);
        dini_IntSet(accFormat,"skin",Player[playerid][skin]);
        dini_IntSet(accFormat,"money",GetPlayerMoney(playerid));
        dini_IntSet(accFormat,"score",GetPlayerScore(playerid));
        dini_FloatSet(accFormat,"lastx",Player[playerid][lastx]);
        dini_FloatSet(accFormat,"lasty",Player[playerid][lasty]);
        dini_FloatSet(accFormat,"lastz",Player[playerid][lastz]);
    }
    else
    {
        Player[playerid][loggedin] = 0;
        Player[playerid][wanted] = 0;
        Player[playerid][skin] = 0;
        Player[playerid][lastx] = (0.0);
        Player[playerid][lasty] = (0.0);
        Player[playerid][lastz] = (0.0);
    }
    return 1;
}
Maybe that?

Edit:

Why:

dini_IntSet(accFormat,"money",GetPlayerMoney(playe rid));
dini_IntSet(accFormat,"score",GetPlayerScore(playe rid));

Its playerid
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)