How is this possible?
#1

This is working:
pawn Код:
PInfo[playerid][Bwarns] = dUserINT(PlayerName2(playerid)).("Bwarns");
And this is not working:
pawn Код:
Weed[playerid] = dUserINT(PlayerName(playerid)).("Weed");
error:
pawn Код:
error 001: expected token: ";", but found ")"
Reply
#2

Check the upper part of

Код:
Weed[playerid] = dUserINT(PlayerName(playerid)).("Weed");
Maybe you are missing the ;

Код:
Cigar[playerid] = dUserINT(PlayerName(playerid)).("Cigar");
Dildo[playerid] = dUserINT(PlayerName(playerid)).("Dildo") <====== This one
Weed[playerid] = dUserINT(PlayerName(playerid)).("Weed");
Reply
#3

Код:
Weed[playerid] = dUserINT(PlayerName2(playerid)).("Weed");
Reply
#4

Quote:
Originally Posted by Macronix
Посмотреть сообщение
Код:
Weed[playerid] = dUserINT(PlayerName2(playerid)).("Weed");
It has nothing to do with that, as iBanner said its probably due to a misshap on the code above that line.
Reply
#5

Okay look:

working:
pawn Код:
Weed[playerid] = dUserINT(formatZ2).("Weed");
Not working:
pawn Код:
Weed[playerid] = dUserINT(PlayerName2(playerid)).("Weed");
- same error

I'm learning.. but what the hell is point here?

EDIT:

pawn Код:
public OnPlayerDisconnect(playerid, reason)
{
    new formatZ2[256];
    new PlayerName[MAX_PLAYER_NAME];
    GetPlayerName(playerid, PlayerName, sizeof(PlayerName));
    format(formatZ2, sizeof(formatZ2), "Drugs/%s.ini", PlayerName);

    if(fexist(formatZ2))
    {
        Weed[playerid] = dUserINT(formatZ2).("Weed");
        Cocaine[playerid] = dUserINT(formatZ2).("Cocaine");
Reply
#6

Mmh, can you show me your PlayerName2(playerid) function?
Reply
#7

Quote:
Originally Posted by bluebaron
Посмотреть сообщение
It has nothing to do with that, as iBanner said its probably due to a misshap on the code above that line.
That would give -> error 1: expected token: ";", but found "-identifier-" instead.

---

Posting PlayerName2 would be helpful but if you cannot get it fixed, use the one that works.
Reply
#8

Quote:
Originally Posted by Konstantinos
Посмотреть сообщение
That would give -> error 1: expected token: ";", but found "-identifier-" instead.

---

Posting PlayerName2 would be helpful but if you cannot get it fixed, use the one that works.
Ha! Nice! Just noticed that the error should be what konstantino said.
Reply
#9

pawn Код:
stock PlayerName2(playerid)
{
    new name[MAX_PLAYER_NAME];
    GetPlayerName(playerid, name, sizeof(name));
    return name;
}
Reply
#10

Okay fixed errors right now..

But why it doesn't want to save that?

pawn Код:
dcmd_test(playerid, params[])
{
#pragma unused params
    Weed[playerid] ++;
    return 1;
}
When I disconnect there isn't "Weed (number here)" saved it's still 0 it doesn't rise :/ this saving system is strange
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)