String return + CallRemoteFunction
#1

Hello! I have no idea, how can I return string from one script to another. Here's an example what I've wrote:

Код:
new VehicleNames[][]= {
    {"Landstalker"}, {"Bravura"}, {"Buffalo"}, ...blablalblabla
};

forward vehicleNamesReturner(vid);
public vehicleNamesReturner(vid)
{
	return VehicleNames[vid];
}
-> public functions may not return arrays (symbol "vehicleNamesReturner")

Ok. Now in my second script, i've got this:

Код:
	for(new i=0;i<sizeof(vehaChanga);i++)
	{
		_vcCPs[i] = CreateDynamicCircle(vehaChanga[i][1], vehaChanga[i][2], 7.5);
		new vehaName[40];
		format(vehaName, sizeof(vehaName), "{00FF00}*{FFFFFF}%s{00FF00}*", CallRemoteFunction("vehicleNamesReturner", "i", floatround(vehaChanga[i][0], floatround_round)-400));
		CreateDynamic3DTextLabel(vehaName, -1, vehaChanga[i][1], vehaChanga[i][2], vehaChanga[i][3], 25.0);
	}
So.. is there any way I could call string, and return it to another script?

Thanks for help.
Reply


Messages In This Thread
String return + CallRemoteFunction - by IgrexolonO - 04.06.2013, 10:15
Re: String return + CallRemoteFunction - by Vince - 04.06.2013, 10:19
Re: String return + CallRemoteFunction - by IgrexolonO - 04.06.2013, 10:28
Re: String return + CallRemoteFunction - by IgrexolonO - 04.06.2013, 11:17
Re: String return + CallRemoteFunction - by NvidiaForTheWin - 04.06.2013, 11:29

Forum Jump:


Users browsing this thread: 1 Guest(s)