Raised This Month: $51 Target: $400
 12% 

SMLIB 0.11 BETA (over 300 Function Stocks) | updated 15.07.2011


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
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
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 21:36.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode