Raised This Month: $ Target: $400
 0% 

Reporting blank in logs?


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
BigBaller
Veteran Member
Join Date: Mar 2004
Location: Everett, WA
Old 11-25-2007 , 04:29   Reporting blank in logs?
Reply With Quote #1

Code:
    set_task(30.0, "currPlayCount") } public currPlayCount() {     new currentCSPlayers = get_playersnum(1)     log_amx("Amount of players or conecting players on the server currently is %s", currentCSPlayers) // Logs the current amount of players or connecting players on the server now. }

I know im doing this wrong somewhere, I am having a huge brain fart. I think it needs to be in a array but im lost.

get_playersnum(1) is suppose to return a native ? 1 i know returns players that are connecting also.

I figured out that I had to convert it into a string. so I added the following things into that snippet above and the log_amx function finally logged a number instead of a blank!

new currPlayerCount[3]

num_to_str(currentCSPlayers, currPlayerCount, 2)
__________________


Last edited by BigBaller; 11-25-2007 at 04:41. Reason: woot figured it out. Sorry this could be locked if need be!
BigBaller 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 01:18.


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