14.03.2016, 20:10
(
Последний раз редактировалось TheCoopster; 15.03.2016 в 18:17.
)
Hi, been trying something different with my script instead of making a bunch of different stocks and stuff to do some work I was using this.
However I am getting this error ->
I will state that "PlayerName" is a stock that returns a player name and PlayerData[playerid][pMask] will return a string based on the name of their mask Eg: Masked_12345.
pMaskOn[playerid] is an Boolean either true or false. IF anyone knows how to fix this I'd greatly appreciate it, thanks.
Edit: I just worked around it by making a stock that returns a string, for some reason it wasn't detecting the PlayerData[playerid][pMask] being a string, thanks anyway.
Fix:
And then for the pMask Comparison change the PlayerData[playerid][pMask] to whatever you named your stock.
pawn Код:
SendLocalMessage(playerid, 30.0, COLOR_PURPLE, "* %s has put away their cellphone.", (pMaskOn[playerid]) ? (PlayerData[playerid][pMask]) : (PlayerName(playerid, false)))
pawn Код:
C:\Desktop\new_0.1.5.pwn(11400) : error 033: array must be indexed (variable "PlayerName")
pMaskOn[playerid] is an Boolean either true or false. IF anyone knows how to fix this I'd greatly appreciate it, thanks.
Edit: I just worked around it by making a stock that returns a string, for some reason it wasn't detecting the PlayerData[playerid][pMask] being a string, thanks anyway.
Fix:
Код:
stock Mask(playerid) { new mask[24]; format(mask, sizeof(mask), PlayerData[playerid][pMask]); return mask; }