Code: Select all
local string tmp;
tmp = ftos(self.armorvalue);
centerprint (tmp);
What does work is this
Code: Select all
local string tmp, output;
tmp = ftos(self.armorvalue);
strcat(output,tmp);
centerprint (output);
Code: Select all
local string tmp;
tmp = ftos(self.armorvalue);
centerprint (tmp);
Code: Select all
local string tmp, output;
tmp = ftos(self.armorvalue);
strcat(output,tmp);
centerprint (output);
Code: Select all
centerprint (self, trace_ent.netname, "\n\b[\b", aval,"œ",hval,"\b]\b\n\n\n\n");
Code: Select all
//
// S T R C A T
//
// Concatenate string
//
string (string s1, string s2)
strcat =
{
local entity hunk;
local float L1, L2, total, alloc_hunk;
if (s1)
{
L1 = strlen (s1);
if (!L1) s1 = string_null;
}
if (s2)
{
L2 = strlen (s2);
if (!L2) s2 = string_null;
}
total = L1 + L2;
if (!total)
return string_null;
allocate_hunk (total);
alloc_hunk = ALLOCATE_HUNK;
hunk = Get_Hunk (HUNK_CONTEXT, alloc_hunk);
if (!hunk)
return string_null;
if (s1)
Write_Hunk_String_e (hunk, s1);
if (s2)
{
hunk = *AddInt (L1 * %1, &hunk);
Write_Hunk_String_e (hunk, s2);
}
return Read_Hunk_String (HUNK_CONTEXT, alloc_hunk);
};