SA-MP Forums Archive
ENUM with a string? - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: ENUM with a string? (/showthread.php?tid=239011)



ENUM with a string? - Skylar Paul - 12.03.2011

This is what I currently have in my enum..

pawn Код:
enum _PINFO
{
    pKills,
    pDeaths,
    pLevel,
    pAdmin,
    pMoney,
    pSkin,
    pFaction,
    pFRank,
    ContractAmount,
    ContractedBy[MAX_PLAYER_NAME],
    Float:pLastX,
    Float:pLastY,
    Float:pLastZ
}
But the only problem is, it's giving me the error: error 047: array sizes do not match, or destination array is too small

Line 470:

pawn Код:
PVar[playerid][ContractedBy] = "Nobody";



Re: ENUM with a string? - Ricop522 - 12.03.2011

try

ContractedBy[128],


Re: ENUM with a string? - Skylar Paul - 12.03.2011

Quote:
Originally Posted by Ricop522
Посмотреть сообщение
try

ContractedBy[128],
Same error, already tried that.


Re: ENUM with a string? - woot - 12.03.2011

pawn Код:
format(PVar[playerid][ContractedBy], MAX_PLAYER_NAME, "Nobody");



Re: ENUM with a string? - Skylar Paul - 12.03.2011

Quote:
Originally Posted by exora
Посмотреть сообщение
pawn Код:
format(PVar[playerid][ContractedBy], MAX_PLAYER_NAME, "Nobody");
Thank you!