You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I wonder how to get the length of an entity's field that is an array.
An example of such a field is in CDOTA_PlayerResource the field m_vecPlayerData, where we access individual entries through, for example, m_vecPlayerData.0003.m_iPlayerSteamID etc.
In an old version of this code (before the gigantic update in commit 805b5d), I used to get the length of an entity's field as follows nplayers, found := entity.FetchUint32("m_vecPlayerData"). Translating this to the new API, I would try nplayers, found := e.GetUint32("m_vecPlayerData"), but this does not work anymore. Actually, e.Get("m_vecPlayerData") does work and returns something of type *manta.fieldState which I cannot further work with, since it's an internal type.
The text was updated successfully, but these errors were encountered:
Hi, I wonder how to get the length of an entity's field that is an array.
An example of such a field is in
CDOTA_PlayerResource
the fieldm_vecPlayerData
, where we access individual entries through, for example,m_vecPlayerData.0003.m_iPlayerSteamID
etc.In an old version of this code (before the gigantic update in commit 805b5d), I used to get the length of an entity's field as follows
nplayers, found := entity.FetchUint32("m_vecPlayerData")
. Translating this to the new API, I would trynplayers, found := e.GetUint32("m_vecPlayerData")
, but this does not work anymore. Actually,e.Get("m_vecPlayerData")
does work and returns something of type*manta.fieldState
which I cannot further work with, since it's an internal type.The text was updated successfully, but these errors were encountered: