View Single Post
berni
SourceMod Plugin Approver
Join Date: May 2007
Location: Austria
Old 01-26-2011 , 08:08   Re: SMLIB 0.9 BETA (266 Function Stocks)
Reply With Quote #11

Quote:
Originally Posted by miniman View Post
1.
PHP Code:
stock (client,  const String:className[]); 
There has been a space between the return type and the functionname, the .inc parser doesn't seeem to like that

Quote:
Originally Posted by AtomicStryker View Post
PHP Code:
Entity_FindByName 
this one uses a classname

PHP Code:
Entity_GetName 
this one a netpropname

Also, you don't actually have a "FindEntityByNetpropName" function, maybe add that.
(netpropname is m_iName .. i don't know what better to call it)
Entity_FindByName takes classname and name. Reason is that Sourcemod currently provides no way iterating over the whole entity list (including none-edict ents) without knowing the classname (FindEntityByClassname).

However there is also Edict_FindByName, that doesn't need a classname to be specified, which searches for edicts only, edicts are all entities with index < 2048, it should be what you need

name == m_iName == targetname, it's all the same.
I don't why Valve has chosen such a weird keyvalue name for the entity name, but the keyvalue targetname is just an alias for m_iName.
But don't mix this with the entity's classname, that are different functions.
__________________
Why reinvent the wheel ? Download smlib with over 350 useful functions.

When people ask me "Plz" just because it's shorter than "Please" I feel perfectly justified to answer "No" because it's shorter than "Yes"
powered by Core i7 3770k | 32GB DDR3 1886Mhz | 2x Vertex4 SSD Raid0

Last edited by berni; 01-26-2011 at 09:08.
berni is offline