29.11.2011, 15:14
Quote:
Code:
cell *dest = NULL; amx_GetAddr(amx,params[2],&dest); int amount_of_nodes = params[1]; RouteID.push_back(IDcounter); RouteVector.push_back(RouteData(dest,amount_of_nodes,IDcounter)); |
but so.. if I do
cell * paths
paths = dest , it doesn't copy the content of dest to paths? then how would I do it? can I use memcpy?
Why I ask it...
pawn Code:
struct RouteData
{
cell * Paths;
int amount_of_nodes;
int id;
RouteData(cell *Paths_,int amount_of_nodes_, int id_)
{
memcpy(Paths,Paths_,amount_of_nodes);// <- This crashes the server
//edit: this too doesn't work:
memcpy(&Paths,Paths_,(amount_of_nodes-1));
//end of edit
//Paths = Paths_;
amount_of_nodes = amount_of_nodes_;
id = id_;
}
};