Einzelnen Beitrag anzeigen
Alt 06.04.2009, 12:53   #1 (permalink)
Hercules-HH
50 Beiträge100 Beiträge
 
Registriert seit: 23.10.2008
Beiträge: 120
Standard Frage zur Lokalen Variable

Ich hab ein Skript gemacht und verstehe nicht, warum die Lokale Variable an einer Stelle nicht funktioniert.

Code:
_Inf1a = Infsdef1a
_Inf1b = Infsdef1b
_Inf1c = Infsdef1c
_Inf1d = Infsdef1d
_Inf1e = Infsdef1e
_Inf1f = Infsdef1f

_Mark1s = "Msdef1"
_Mark1a = "Madef1"
_Mark1b = "Mbdef1"
_Mark1g = "Mgdef1"
_Mark1d = "Mddef1"
_Mark1e = "Medef1"
_Mark1o = "Modef1"

Das Funktioniert so Perfekt:

#Start
~1.5
? !(getMarkerPos _Mark1s distance Scanner < _abst) : goto "Ainfs1";
#Abinfs1a
? (!(alive _Inf1a)) : goto "Abinfs1b";
_Mark1s setMarkerpos getPos Infsdef1a; goto "Abinfs2";
#Abinfs1b
? (!(alive _Inf1b)) : goto "Abinfs1c";
_Mark1s setMarkerpos getPos Infsdef1b; goto "Abinfs2";
#Abinfs1c
? (!(alive _Inf1c)) : goto "Abinfs1d";
_Mark1s setMarkerpos getPos Infsdef1c; goto "Abinfs2";
#Abinfs1d
? (!(alive _Inf1d)) : goto "Abinfs1e";
_Mark1s setMarkerpos getPos Infsdef1d; goto "Abinfs2";
#Abinfs1e
? (!(alive _Inf1e)) : goto "Abinfs1f";
_Mark1s setMarkerpos getPos Infsdef1e; goto "Abinfs2";
#Abinfs1f
if(alive _Inf1f)then{_Mark1s setMarkerpos getPos Infsdef1f}else{deleteMarker _Mark1s};
goto "Abinfs2";
....es geht noch weiter

Doch nun sollte ja Inf1a, Inf1b usw. alle Infsdef1a, Infsdef1b usw.
ersetzten, was dann aber nicht funktioniert:

#Start
~1.5
? !(getMarkerPos _Mark1s distance Scanner < _abst) : goto "Ainfs1";
#Abinfs1a
? (!(alive _Inf1a)) : goto "Abinfs1b";
_Mark1s setMarkerpos getPos _Inf1a; goto "Abinfs2";
#Abinfs1b
? (!(alive _Inf1b)) : goto "Abinfs1c";
_Mark1s setMarkerpos getPos _Inf1b; goto "Abinfs2";
#Abinfs1c
? (!(alive _Inf1c)) : goto "Abinfs1d";
_Mark1s setMarkerpos getPos _Inf1c; goto "Abinfs2";
#Abinfs1d
? (!(alive _Inf1d)) : goto "Abinfs1e";
_Mark1s setMarkerpos getPos _Inf1d; goto "Abinfs2";
#Abinfs1e
? (!(alive _Inf1e)) : goto "Abinfs1f";
_Mark1s setMarkerpos getPos _Inf1e; goto "Abinfs2";
#Abinfs1f
if(alive _Inf1f)then{_Mark1s setMarkerpos getPos _Inf1f}else{deleteMarker _Mark1s};
goto "Abinfs2";

Nun geht es nicht mehr, was ich leider nicht nachvollziehen kann.
Sobald ich das wieder Rückgängig mache geht alles wieder.
__________________
Besser verrückt, als normal und langweilig zu sein. Wer den allen gesellschaftlichen Normen und Regeln folgen will, wird zwangsläufig irgendwann am Fenster stehen und sich aufregen, weil jemand auf der Straße ein Taschentuch nicht aufheben möchte. Man wird zu jemanden, den man schon als Kind gehasst hat.
Dann bin ich lieber verrückt und glücklich, durchgeknallt, aber interessant -> einzigartig!
Hercules-HH ist offline   Mit Zitat antworten