How do I forward a string that can be changed?
Currently my forward looks like this:
PHP Code:
g_hGFwd = CreateGlobalForward("MyForward", ET_Event, Param_Cell, Param_Cell, Param_String, Param_Cell, Param_CellByRef);
new Action:result = Plugin_Continue;
Call_StartForward(g_hGFwd);
Call_PushCell(char);
Call_PushCell(client);
Call_PushString(buffer);
Call_PushCell(sizeof(buffer));
Call_PushCellRef(refStyle);
Call_Finish(result);
Now if I try to change that string in one of the forwards with strcopy I get a memory leak error 18.
PHP Code:
public Action:OnMyForward(char, client, String:text[], len, &style)
{
strcopy(text, len, "test");
return Plugin_Changed;
}
Or am I completely off track here?