All times are UTC




Post new topic Reply to topic  [ 1 post ] 
Author Message
 Post subject: null exception
PostPosted: Tue Mar 30, 2010 6:09 pm 
Offline
New User

Joined: Tue Mar 30, 2010 5:58 pm
Posts: 1
Hello, I've got some problem in using GMSI.

I wrote next script to rename ID's in my map once...
include("dialog.gsl");

string mapFile = (@args[0] == null?fileDialog("Choose a map",@inputPath,".w3x"):@args[0]);
if(mapFile == null) fail("Choose a map file!");

Map map = loadMap(mapFile,false,false);

void Rename(string oldID, string newID)
{
   map.objects[newID] = map.objects[oldID];
   unset(map.objects[oldID]);
}

Rename("A01U","AB01"); //com
Rename("A027","AB02"); //com

But next error occurred due process:
Quote:
null
java.lang.NullPointerException
at wcData.objects.WC3DefaultValues.identifierToGameName(WC3DefaultValues.java:304)
at wcData.objects.W3O_File.readObject(W3O_File.java:215)
at wcData.objects.W3O_File.fromFile(W3O_File.java:180)
at wcData.MapHandle.loadObjects(MapHandle.java:133)
at systemCalls.Trap_LoadObjects.apply(Trap_LoadObjects.java:27)
at script.LRfinalTokens.NativeFunctionDefinition.call(NativeFunctionDefinition.java:53)
at script.LRfinalTokens.FunctionCall.eval(FunctionCall.java:75)
at script.LRfinalTokens.SemicolonStatement.eval(SemicolonStatement.java:30)
at script.LRfinalTokens.IfStatement.eval(IfStatement.java:41)
at script.LRfinalTokens.ScriptBracketStatement.eval(ScriptBracketStatement.java:67)
at script.LRfinalTokens.FunctionDefinition.call(FunctionDefinition.java:128)
at script.LRfinalTokens.FunctionCall.eval(FunctionCall.java:75)
at script.LRfinalTokens.ReturnStatement.eval(ReturnStatement.java:41)
at script.LRfinalTokens.ScriptBracketStatement.eval(ScriptBracketStatement.java:67)
at script.LRfinalTokens.FunctionDefinition.call(FunctionDefinition.java:128)
at script.LRfinalTokens.FunctionCall.eval(FunctionCall.java:75)
at script.LRfinalTokens.AssignDefStatement.eval(AssignDefStatement.java:47)
at script.LRhighTokens.StatementList.eval(StatementList.java:49)
at script.ParsedCode.eval(ParsedCode.java:35)
at script.Script.execFile(Script.java:133)
at program.JobExecFile.execute(JobExecFile.java:49)
at program.WorkerThread.run(WorkerThread.java:24)

In log it placed after 'Trying to extract war3map.w3t from D:\GMSI beta v2.1.20\temp\in\0\map.w3x --> found"'
If I retry execution next new error take place:
'Critical IO Error: Cannot delete D:\GMSI beta v2.1.20\temp\in\0\war3map.w3t!'

What wrong I do? Or my map so hard? ><


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group