Raised This Month: $ Target: $400
 0% 

[SNIPPET] Get Workshop Map Name


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Powerlord
AlliedModders Donor
Join Date: Jun 2008
Location: Seduce Me!
Old 10-15-2014 , 11:10   Re: [SNIPPET] Get Workshop Map Name
Reply With Quote #1

Quote:
Originally Posted by Leonardo View Post
so strcopy(destination, maxlen, ""); is faster/better than destination[0] = 0; ?
Yes1. Unless you meant than destination[0] = '\0'; in which case, no. I missed that I did a strcopy of "", whoops.

The comment optimization above it was there because earlier in development, it didn't check so it kept going all the way down the function when the copy length was 0.

To be honest, the entire SubString function is unnecessary as long as its args are positive, as it's just a fancy wrapper for strcopy.

1Because destination is tagged as String and that will toss warnings/errors.
Attached Files
File Type: inc map_workshop_functions.inc (5.5 KB, 378 views)
__________________
Not currently working on SourceMod plugin development.

Last edited by Powerlord; 10-15-2014 at 11:20.
Powerlord is offline
Reply



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 18:30.


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