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



Errors... - Jstylezzz - 05.06.2012

Hi everyone,

I just made these stock functions, and yeah, i know, is suck at making stock functions..
here are the stocks:

pawn Код:
stock HasMask(playerid)
{
    if(PInfo[playerid][Mask] == 1)
    {
    HMask = "Yes";//line 1039
    }
    else
    {
    HMask = "No";
    }
    return HMask;
}

stock HasSex(playerid)
{
    if(PInfo[playerid][PSex] == 0)
    {
    PlayerSex = "Male";
    }
    else
    {
    PlayerSex = "Female";//line 1043
    }
    return PlayerSex;
}
and the errors..
Код:
F:\Programming\WSRP\gamemodes\Untitled.pwn(1039) : error 006: must be assigned to an array
F:\Programming\WSRP\gamemodes\Untitled.pwn(1043) : error 006: must be assigned to an array
Does anyone know what goes wrong!?


Re: Errors... - TzAkS. - 05.06.2012

How did you created HMask?
It need to be a string like
new HMask[4];


Re: Errors... - Jstylezzz - 05.06.2012

Quote:
Originally Posted by TzAkS.
Посмотреть сообщение
How did you created HMask?
It need to be a string like
new HMask[4];
^this..

Thanks man, i learned something xD