SA-MP Forums Archive
Help? - 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? (/showthread.php?tid=384030)



Help? - N0FeaR - 09.10.2012

Код:
C:\Users\Hellman.Hellmans-PC\Desktop\snusk\gamemodes\PS-RP.pwn(16935) : error 076: syntax error in the expression, or invalid function call
pawn Код:
format(string, sizeof(string), "* %s has pickup %s boombox.", SenderName, CheckSex(playerid));



Re: Help? - TzAkS. - 09.10.2012

Post here how you have SenderName and CheckSex


Re: Help? - N0FeaR - 09.10.2012

pawn Код:
}
stock CheckSex(playerid)
{
    new atext[5],string[5];
    switch (PlayerInfo[playerid][pSex])
    {
        case 1: atext = "his";
        case 2: atext = "her";
    }
    format(string, sizeof(string),"%s", atext);
    return string;
}

}
stock SenderName(playerid)
{
    new name[MAX_PLAYER_NAME];
    GetPlayerName(playerid, name, sizeof(name));
    return name;
}



Re: Help? - Riddick94 - 09.10.2012

pawn Код:
new atext[5],string[5];
Change the array amount to atleast 24.

@Down, in my past i had a problem with array which is lower than 24. It's seems its fixed now. Actually.. it was the same thing with gender.


Re: Help? - ViniBorn - 09.10.2012

pawn Код:
stock CheckSex(playerid)
{
    new atext[5];
    switch (PlayerInfo[playerid][pSex])
    {
        case 1: atext = "his";
        case 2: atext = "her";
    }
    return atext;
}
You don't need use string[5]


Re: Help? - N0FeaR - 09.10.2012

Found a solution now, thank you.