For starters:
char params[256];
sprintf(params, "%d,%s,%s,%s,%s,%s,%s,%s",params,Get_Parameter("0.0"),Get_Parameter("300.0"),Get_Parameter("10.0"),Get_Parameter("CnC_GDI_Orca"),Get_Parameter("CnC_GDI_Transport"),Get_Parameter("CnC_Nod_Apache"),Get_Parameter("CnC_Nod_Transport"));
Attach_Script_Once(nsam,"JFW_Base_Defence_Aircraft_Only",params);
Should pobably be like this:
char params[256];
sprint(params,"0.0,300.0,10.0,CnC_GDI_Orca, CnC_GDI_Transport,CnC_Nod_Apache,CnC_Nod_Transport");
Attach_Script_Once(nsam,"JFW_Base_Defence_Aircraft_Only",params);
Or even better
Attach_Script_Once(nsam,"JFW_Base_Defence_Aircraft_Only","0.0,300.0,10.0,CnC_GDI_Orca, CnC_GDI_Transport,CnC_Nod_Apache,CnC_Nod_Transport");
Also, feeding params back into params is a bad idea:
sprintf(params,"%d",params);
plus it won't work like that, because params is a char and %d is for int.
The only time feeding a string back into itself is useful is if you have the origial string set to something, otherwise you risk filling it with junk.
IE:
char params[256];
sprintf(params,"stuff");
sprintf(params,"%s is stuff",params);
Console_Input(params);
would give you:
[Updated on: Fri, 08 June 2012 05:52]
Report message to a moderator