Raised This Month: $ Target: $400
 0% 

solved String print help


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
TheRadiance
Senior Member
Join Date: Nov 2007
Location: Kazakhstan
Old 06-29-2009 , 08:36   solved String print help
Reply With Quote #1

Hello all.
I have a "stupid" problem with string printing and i don't know how to solve it.

I have a global constant variable named g_table(the only variable named g_table in the script) that contains string "banned_ids".
PHP Code:
//...
new const g_table[] = "banned_ids";
//... 
I added test-print in plugin_init().
PHP Code:
//...
new const g_table[] = "banned_ids";

public 
plugin_init()
{
    
register_plugin("amx_banid""1.0""Radiance");
    
register_concmd("amx_banid""cmd_banid"ADMIN_BAN"<name or #userid> <minutes>");
    
server_print("test-print: %s"g_table);
//... 
And also i added test-print into admin command function.
PHP Code:
//...
public cmd_banid(idlevelcid)
{
    if (!
cmd_access(idlevelcid3))
    {
        return 
1;
    }

    
client_print(idprint_console"test-print: %s"g_table);
//... 
From plugin_init() print i got: test-print: banned_ids
From cmd_banid() print i got: test-print:

g_table is empy in the second case. Why?
And there is no errors/debug in the server's/client's console.
Need help ^^

Thanks in advance.
Sorry for bad English.

Last edited by TheRadiance; 06-29-2009 at 10:21.
TheRadiance is offline
Send a message via ICQ to TheRadiance
 



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:33.


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