War System

Započeo #Nemanja, Februar 18, 2018, 22:20:21 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

Detaljan opis problema: Izbacuje mi error. pokusao sam ubaciti Dimijev war system i izbacuje ovaj error
Dio skripte:Dole
Neke slike/video za lakse dobivanje pomoci(neobavezno)://

[pawn]error 090: public functions may not return arrays (symbol "getOrgName")[/pawn]

[pawn]forward GetPlayerLeader( playerid );
public GetPlayerLeader( playerid )
{
    return PlayerInfo[ playerid ][ pLider ];
}
forward GetPlayerMember( playerid );
public GetPlayerMember( playerid )
{
    return PlayerInfo[ playerid ][ pClan ];
}
forward getOrgName( orgID );
public getOrgName( orgID ) {
   new orgName[64] = "Los Santos Police Department";

        if( orgID == 0 ) orgName = "Civil";
   else if( orgID == 1 ) orgName = "Fort Carson Police Department";
   else if( orgID == 2 ) orgName = "Yakuza";
   else if( orgID == 3 ) orgName = "River Boys";
   else if( orgID == 4 ) orgName = "Mara Salvatrucha";
   else if( orgID == 5 ) orgName = "Novinari";
   
   return orgName;
}[/pawn]



#Nemanja


HTML/CSS Programmer
SA:MP Player since 2013


Citat: #Nemanja poslato Februar 18, 2018, 22:20:21 POSLE PODNE
Detaljan opis problema: Izbacuje mi error. pokusao sam ubaciti Dimijev war system i izbacuje ovaj error
Dio skripte:Dole
Neke slike/video za lakse dobivanje pomoci(neobavezno)://

[pawn]error 090: public functions may not return arrays (symbol "getOrgName")[/pawn]

[pawn]forward GetPlayerLeader( playerid );
public GetPlayerLeader( playerid )
{
    return PlayerInfo[ playerid ][ pLider ];
}
forward GetPlayerMember( playerid );
public GetPlayerMember( playerid )
{
    return PlayerInfo[ playerid ][ pClan ];
}
forward getOrgName( orgID );
public getOrgName( orgID ) {
   new orgName[64] = "Los Santos Police Department";

        if( orgID == 0 ) orgName = "Civil";
   else if( orgID == 1 ) orgName = "Fort Carson Police Department";
   else if( orgID == 2 ) orgName = "Yakuza";
   else if( orgID == 3 ) orgName = "River Boys";
   else if( orgID == 4 ) orgName = "Mara Salvatrucha";
   else if( orgID == 5 ) orgName = "Novinari";
   
   return orgName;
}[/pawn]

CitatPublic functions cannot return an array/string.

Replace public with stock and remove the forward line of it.

By the way, use smaller sizes for your arrays. 900 and 255 are way too high.


[pawn]La vita E bella [/pawn]

Hvala radi :D


#Nemanja


HTML/CSS Programmer
SA:MP Player since 2013