Naja, okay, ich kenn' mich mit Linux nicht so aus, kann sein.
Allgemein
Bug Thread
$test = int ($bla -0.5);
$test = int (($bla) -0.5);
$test = int (($bla +0) -0.5);
$bla = int(7.5*(2.5*3)+2);
int oder vielleicht bei noch mehr ein Problem mit inneren Klammern.
on:use {
	msgbox "Garten","sys/scripts/butterflygarden.s2s";
}
on:build_finish {
	event "gardenbuild",0,0;
}
on:changeday {
	local $c;
	$c+=count_inrange("unit",6,250,"self");
	$c+=count_inrange("unit",7,250,"self");
	if ($c<3){
		create "unit",random(6,7),getx("self"),getz("self");
		if (random(2)==1){
			create "unit",random(6,7),getx("self"),getz("self");
		}
	}
}
on:use {
	msgbox "Garten","sys/scripts/butterflygarden.s2s";
}
on:build_finish {
	event "gardenbuild",0,0;
}
on:changeday {
	local $c;
	$c+=count_inrange("unit",6,250,"self");
	$c+=count_inrange("unit",7,250,"self");
	if ($c<3){
		create "unit",random(6,7),getx("self"),getz("self");
		if (random(2)==1){
			create "unit",random(6,7),getx("self"),getz("self");
		}
	}
	freevar $c;
}
Mr Stranded?
freevar). So würde sie nicht in Spielständen gespeichert, was eh nur Platzverschwendung ist.
freevar ersetzt.
Hurri04 has written
getlocal, der bisher bisher beim auslösen des events, dem er untergeordnet war, in der konsole eine fehlermeldung ausspuckte.on:start {
	local "$bag_amount";
	$bag_amount=count("item", 1);
}
on:hit {
	$temp_class=currentclass();
	$temp_id=currentid();
	$glob_bag_amount=count("item", 1);
	setlocal "$temp_class", $temp_id, "$bag_amount", $glob_bag_amount;
	getlocal("item", $temp_id, "$bag_amount");
	msg "$bag_amount";
}
getlocal -befehl noch zwei kommata anhängt, dann tritt das problem nicht mehr auf und das script funktioniert wunderbar:on:start {
	local "$bag_amount";
	$bag_amount=count("item", 1);
}
on:hit {
	$temp_class=currentclass();
	$temp_id=currentid();
	$glob_bag_amount=count("item", 1);
	setlocal "$temp_class", $temp_id, "$bag_amount", $glob_bag_amount;
	getlocal("item", $temp_id, "$bag_amount"),,;		// HIER MÜSSEN ZWEI KOMMATA SEIN!
	msg "$bag_amount";
}
on:start {
	local $bag_amount;
	$bag_amount=count("item", 1);
}
on:hit {
	$temp_class=currentclass();
	$temp_id=currentid();
	$glob_bag_amount=count("item", 1);
	setlocal "$temp_class", $temp_id, "bag_amount", $glob_bag_amount;
	getlocal("item", $temp_id, "bag_amount");
	msg "$bag_amount";
}
getlocal befehl auch funktionierte, wenn davor keine variable stand, also z.b.$var=getlocal("item", $temp_id, "$bag_amount");
setlocal und
getlocal befehle zu vermeiden. ich mein mich erinnern zu können, dass die recht viel leistung ziehen, wenn man sie schon nen paarmal auf einmal verwendet und manchmal gibts dann da andere lösungen, die effektiver sind
local.