Raised This Month: $ Target: $400
 0% 

Returning String (Structure)


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
hleV
Veteran Member
Join Date: Mar 2007
Location: Lithuania
Old 12-05-2010 , 08:47   Returning String (Structure)
Reply With Quote #1

Code:
#include <amxmodx>   enum DATA {         DATA_NAME[32],         Float:DATA_HEALTH };   new Data[33][DATA];   public plugin_init()         register_clcmd("say /test", "SayTest");   public SayTest(client) {         Data[client][DATA_HEALTH] = _:100;           get_user_name(client, Data[client][DATA_NAME], 31);         client_print(client, print_chat, "[Test] Health: %f, name: %s", GetData(client, DATA_HEALTH), GetData(client, DATA_NAME));           return PLUGIN_HANDLED; }   stock any:GetData(client, DATA:data)         return Data[client][data];
Is it possible to return full string when you have an enumeration/structure?
Currently it prints:
Code:
[Test] Health: 100.000000, name: h
when it should print my full name "hleV".
It also terminates the string and after the "h" nothing else is written.
__________________

Last edited by hleV; 12-05-2010 at 08:50.
hleV is offline
 


Thread Tools
Display Modes

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 11:22.


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