SA-MP Forums Archive
Problem with Fraktion - 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: Problem with Fraktion (/showthread.php?tid=376463)



Problem with Fraktion - blackfire49 - 10.09.2012

Hello i need help with my Fraktion also i want my stock to return the FrakName from the Fraktion but for some reason i become this error

pawn Код:
Reallife.pwn(620) : error 079: inconsistent return types (array & non-array)
here my stock

pawn Код:
stock FrakName(playerid)
{
    new frakname[40],Ffile[129];
    for(new f = 0; f < 13; f++)
    {
        format(Ffile,sizeof(Ffile),"/Fraktion/%s.ini",FInfo[f][FName]);
        format(frakname,sizeof(frakname),FInfo[f][FName])
        if(SpInfo[playerid][Fraktion] >= 0)return frakname;
    }
    return 0;
}



Re: Problem with Fraktion - lamarr007 - 10.09.2012

Try deleting return 0.
pawn Код:
stock FrakName(playerid)
{
    new frakname[40],Ffile[129];
    for(new f = 0; f < 13; f++)
    {
        format(Ffile,sizeof(Ffile),"/Fraktion/%s.ini",FInfo[f][FName]);
        format(frakname,sizeof(frakname),FInfo[f][FName]);
        if(SpInfo[playerid][Fraktion] >= 0) return frakname;
    }
}



AW: Problem with Fraktion - blackfire49 - 10.09.2012

If i do this i become this error

pawn Код:
Reallife.pwn(620) : warning 209: function "FrakName" should return a value