boshaw wrote:Search for a ISBox type widget (which are each indiviual sign component)

boshaw wrote:Search for a ISBox type widget (which are each indiviual sign component)
boshaw wrote:Search for a ISBox type widget (which are each indiviual sign component)
synchronized(ui.rwidgets){
Iterator i = ui.rwidgets.keySet().iterator();
Widget w = null;
while(i.hasNext()){
w = i.next();
if(w instanceof ISBox){
ISBox is = (ISBox)w;
if(res.name.equals("ENTER_RESOURCE_NAME_OF_ITEM_DESIRED")){
for(int i = 0;i < NUMBER_OF_ITEMS_WANTED_FROM_SIGN;++i)
is.wdgmsg("xfer2",-1,ui.modflags());
}
}
}
}
Exception in groovy script engine:
org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
/D:/Games/hh_panaeon/scripts/new.groovy: 154: The current scope already contains
a variable of the name i
@ line 154, column 21.
for(int i = 0;i < NUMBER_OF_ITEMS_WANTED_FROM_SIGN;++i)
^
/D:/Games/hh_panaeon/scripts/new.groovy: 148: unable to resolve class Widget
@ line 148, column 11.
Widget w = null;
^
/D:/Games/hh_panaeon/scripts/new.groovy: 151: unable to resolve class ISBox
@ line 151, column 23.
if(w instanceof ISBox){
^
/D:/Games/hh_panaeon/scripts/new.groovy: 152: unable to resolve class ISBox
@ line 152, column 16.
ISBox is = (ISBox)w;
^
/D:/Games/hh_panaeon/scripts/new.groovy: 152: unable to resolve class ISBox
@ line 152, column 21.
ISBox is = (ISBox)w;
^
5 errors
at org.codehaus.groovy.control.ErrorCollector.failIfErrors(ErrorCollecto
r.java:296)
at org.codehaus.groovy.control.CompilationUnit.applyToSourceUnits(Compil
ationUnit.java:829)
at org.codehaus.groovy.control.CompilationUnit.doPhaseOperation(Compilat
ionUnit.java:511)
at org.codehaus.groovy.control.CompilationUnit.processPhaseOperations(Co
mpilationUnit.java:487)
at org.codehaus.groovy.control.CompilationUnit.compile(CompilationUnit.j
ava:464)
at groovy.lang.GroovyClassLoader.doParseClass(GroovyClassLoader.java:306
)
at groovy.lang.GroovyClassLoader.parseClass(GroovyClassLoader.java:287)
at groovy.util.GroovyScriptEngine$ScriptClassLoader.parseClass(GroovyScr
iptEngine.java:186)
at groovy.lang.GroovyClassLoader.parseClass(GroovyClassLoader.java:267)
at groovy.lang.GroovyClassLoader.parseClass(GroovyClassLoader.java:214)
at groovy.util.GroovyScriptEngine.loadScriptByName(GroovyScriptEngine.ja
va:459)
at groovy.util.GroovyScriptEngine.createScript(GroovyScriptEngine.java:5
28)
at groovy.util.GroovyScriptEngine.run(GroovyScriptEngine.java:515)
at haven.hhl.hhl_main.ParseScript(hhl_main.java:70)
at haven.hhl.hhl_thread.run(hhl_main.java:89)
jaguar wrote:Thank you for replay.
This script give me an error:
- Code: Select all
Exception in groovy script engine:
org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
/D:/Games/hh_panaeon/scripts/new.groovy: 154: The current scope already contains
a variable of the name i
@ line 154, column 21.
for(int i = 0;i < NUMBER_OF_ITEMS_WANTED_FROM_SIGN;++i)
^
/D:/Games/hh_panaeon/scripts/new.groovy: 148: unable to resolve class Widget
@ line 148, column 11.
Widget w = null;
^
/D:/Games/hh_panaeon/scripts/new.groovy: 151: unable to resolve class ISBox
@ line 151, column 23.
if(w instanceof ISBox){
^
/D:/Games/hh_panaeon/scripts/new.groovy: 152: unable to resolve class ISBox
@ line 152, column 16.
ISBox is = (ISBox)w;
^
/D:/Games/hh_panaeon/scripts/new.groovy: 152: unable to resolve class ISBox
@ line 152, column 21.
ISBox is = (ISBox)w;
^
5 errors
at org.codehaus.groovy.control.ErrorCollector.failIfErrors(ErrorCollecto
r.java:296)
at org.codehaus.groovy.control.CompilationUnit.applyToSourceUnits(Compil
ationUnit.java:829)
at org.codehaus.groovy.control.CompilationUnit.doPhaseOperation(Compilat
ionUnit.java:511)
at org.codehaus.groovy.control.CompilationUnit.processPhaseOperations(Co
mpilationUnit.java:487)
at org.codehaus.groovy.control.CompilationUnit.compile(CompilationUnit.j
ava:464)
at groovy.lang.GroovyClassLoader.doParseClass(GroovyClassLoader.java:306
)
at groovy.lang.GroovyClassLoader.parseClass(GroovyClassLoader.java:287)
at groovy.util.GroovyScriptEngine$ScriptClassLoader.parseClass(GroovyScr
iptEngine.java:186)
at groovy.lang.GroovyClassLoader.parseClass(GroovyClassLoader.java:267)
at groovy.lang.GroovyClassLoader.parseClass(GroovyClassLoader.java:214)
at groovy.util.GroovyScriptEngine.loadScriptByName(GroovyScriptEngine.ja
va:459)
at groovy.util.GroovyScriptEngine.createScript(GroovyScriptEngine.java:5
28)
at groovy.util.GroovyScriptEngine.run(GroovyScriptEngine.java:515)
at haven.hhl.hhl_main.ParseScript(hhl_main.java:70)
at haven.hhl.hhl_thread.run(hhl_main.java:89)
Users browsing this forum: Ahrefs [Bot], Claude [Bot] and 1 guest