Raised This Month: $ Target: $400
 0% 

VERY irksum problem -solved-


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 07-04-2012 , 11:22   Re: VERY irksum problem
Reply With Quote #7

Quote:
Originally Posted by Liverwiz View Post
No errors. Neither compile time, nor run time. It just simply doesn't work. I'd love for you to check out the code. I'll attach all 2k lines. God speed.
I'm aware of how sub-par code it is. But its pretty complex, and pawn doesn't make splitting up programs into separate classes easy. So i do what i can.
You can see old, working, code at this thread. Before i added the API
http://forums.alliedmods.net/showthread.php?t=185404
If you PM me i can also give you the IP to the test server (running the version i attached)
Can you include all files I need to compile?

Quote:
Originally Posted by Liverwiz View Post
That's a great idea. Could you show me how to retrieve the CVAR, then store its pointer? I've never heard of doing that.
I included code in my post to do this.

Quote:
Originally Posted by Liverwiz View Post
I do because its faster. Check out Exolent's tut on data types. static declarations just reserve memory space, and aren't zero'd when they come into scope. Because zeroing is the biggest performance hit, i avoid it when i can.
It's better in some situations, not all. If you are using a variable that would be initialized very frequently (like in prethink or cmdstart) or you're declaring a large array then it is better to use static so the memory will only need to be allocated once and then can be re-used with each instance of the function call. For declaring a single cell of data (or small array) that is not called frequently then just declare it as new.
__________________
Bugsy 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 15:03.


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