AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Console output error (https://forums.alliedmods.net/showthread.php?t=12653)

BigWalnutZ 04-20-2005 13:28

Console output error
 
Hey all, having a frustrating time with something extremely stupid. My console messages "server_print()" are not coming out right. They are not making a new line so the next command is on the same line as the last output. Easier to see that to type about:

Code:

] amx_whowas tom
[WHOIS] No Results for: 'tom'] amx_whowas mu
[WHOIS] No Results for: 'mu'] amx_whowas amd
[WHOIS] No Results for: 'amd'] amx_whowas tim
[WHOIS] No Results for: 'tim'] amx_whowa

What am I doing wrong or what needs to be changed?
Code:
  new iNumrows = dbi_num_rows(retval)   if (retval == RESULT_FAILED) {     dbi_error(mySql, error, 127)     log_amx("SQL Error: %L", error)     closeDatabase()     return PLUGIN_HANDLED   } else if (retval == RESULT_NONE) {     client_print(id, print_console, "[WHOIS] No Results for: '%s'", search)     closeDatabase()     return PLUGIN_HANDLED   }
I even tried:


Code:
    client_print(id, print_console, "[WHOIS] No Results for: '%s'^n", search)

XxAvalanchexX 04-20-2005 13:48

If ^n isn't working and you're really desperate, you could try using client_cmd(id," "); which theoretically puts a space into their console and executes it, thus making a new line.

BigWalnutZ 04-20-2005 13:50

I have thought of a few different rig jobs like that, but I am more so looking for why is it doing that. All the examples I look at do not have that and they work just fine. I don't know why it is picking on me :-/

XxAvalanchexX 04-20-2005 13:54

Try adding a few extra ^n's and see if it changes. Add text to your client_print AFTER the ^n's to see how it gets placed.


All times are GMT -4. The time now is 10:01.

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