Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Got a syntax error using D2NT 3.3
#1
when i start up my bot I get the following error message:

<D2NT Error> C:\D2NT\scripts\libs\common\NTItemParser.ntl
(64) : SyntaxError : invalid assignment left-hand side

Loaded default config

Anyone know what that means or how do i fix it, the bot just sits there and does nothing now?
Reply
#2
can you open that file and copy it here?
Reply
#3
/*
[Item-parser Syntax Information]
1. [Keyword] separates into two groups
- [Property Keywords] : [Type], [Name], [Class], [Quality], [Flag], [Level], [Prefix], [Suffix]
- [Stat Keywords] : [Number or Alias]
2. [Keyword] must be surrounded by '[' and ']'
3. [Property Keywords] must be placed first
4. Insert '#' symbol between [Property Keywords] and [Stat Keywords]
5. Use '+', '-', '*', '/', '(', ')', '&&', '||', '>', '>=', '<', '<=', '==', '!=' symbols for comparison
6. Use '//' symbol for comment
*/
Include("libs/common/NTItemAlias.ntl");
var _NTIP_CheckList = new Array();
function NTIPOpenFile(filepath)
{
var _nipfile;
var _line;
_nipfile = FileOpen(filepath, 0);
if(!_nipfile)
return false;
while(!_nipfile.eof)
{
_line = NTIPParseLineInt(_nipfile.ReadLine());
if(_line)
_NTIP_CheckList.push(_line);
}
_nipfile.Close();
return true;
}
function NTIPCheckItem(item)
{
var i;
var _identified;
var _result = 0;
_identified = item.itemflag & 0x10;
for(i = 0 ; i < _NTIP_CheckList.length ; i++)
{
if(_NTIP_CheckList[i][0].length > 0)
{
if(eval(_NTIP_CheckList[i][0]))
{
if(_NTIP_CheckList[i][1].length > 0)
{
if(eval(_NTIP_CheckList[i][1]))
return 1;
else if(!_identified && _result == 0)
_result = -1;
}
else
return 1;
}
}
else if(_NTIP_CheckList[i][1].length > 0)
{
if(eval(_NTIP_CheckList[i][1]))
return 1;
else if(!_identified && _result == 0)
_result = -1;
}
}
return _result;
}
// Internal function
function NTIPParseLineInt(input)
{
var i;
var _start, _end;
var _section, _keyword;
var _result;
_end = input.indexOf("//");
if(_end != -1)
input = input.substring(0, _end);
input = input.replace(/ |;/g, "").toLowerCase();
if(input.length < 5)
return null;
_result = input.split("#");
if(_result[0] && _result[0].length > 4)
{
_section = _result[0].split("[");
_result[0] = _section[0];
for(i = 1 ; i < _section.length ; i++)
{
_end = _section[i].indexOf("]") + 1;
switch(_section[i][0])
{
case 't':
_result[0] += "item.itemtype";
break;
case 'n':
_result[0] += "item.classid";
break;
case 'c':
_result[0] += "item.itemclass";
break;
case 'q':
_result[0] += "item.quality";
break;
case 'f':
if(_section[i][_end] == '!')
_result[0] += "!(item.itemflag&";
else
_result[0] += "(item.itemflag&";
_end += 2;
break;
case 'l':
_result[0] += "item.itemlevel";
break;
case 'p':
_result[0] += "item.itemprefix";
break;
case 's':
_result[0] += "item.itemsuffix";
break;
default:
Print("Unknown Keyword : " + input);
break;
}
for(_start = _end ; _end < _section[i].length ; _end++)
{
if(!NTIPIsSyntaxInt(_section[i][_end]))
break;
}
_result[0] += _section[i].substring(_start, _end);
for(_start = _end ; _end < _section[i].length ; _end++)
{
if(NTIPIsSyntaxInt(_section[i][_end]))
break;
}
_keyword = _section[i].substring(_start, _end);
if(isNaN(_keyword))
{
switch(_section[i][0])
{
case 't':
_result[0] += _NTIPAliasType[_keyword];
break;
case 'n':
_result[0] += _NTIPAliasClassID[_keyword];
break;
case 'c':
_result[0] += _NTIPAliasClass[_keyword];
break;
case 'q':
_result[0] += _NTIPAliasQuality[_keyword];
break;
case 'f':
_result[0] += _NTIPAliasFlag[_keyword] + ")";
break;
}
}
else
{
if(_section[i][0] == 'f')
_result[0] += _keyword + ")";
else
_result[0] += _keyword;
}
_result[0] += _section[i].substring(_end);
}
}
else
_result[0] = "";
if(_result[1] && _result[1].length > 4)
{
_section = _result[1].split("[");
_result[1] = _section[0];
for(i = 1 ; i < _section.length ; i++)
{
_end = _section[i].indexOf("]");
_keyword = _section[i].substring(0, _end);
if(isNaN(_keyword))
_result[1] += "item.GetStat(" + _NTIPAliasStat[_keyword] + ")";
else
_result[1] += "item.GetStat(" + _keyword + ")";
_result[1] += _section[i].substring(_end+1);
}
}
else
_result[1] = "";
return _result;
}
function NTIPIsSyntaxInt(ch)
{
return (ch == '!' || ch == '%' || ch == '&' || (ch >= '(' && ch <= '+') || ch == '-' || ch == '/' || (ch >= ':' && ch <= '?') || ch == '|');
}
Reply
#4
the error is not in that file that file is telling you have a error in your nip (pickit) file/s
check what you have edit there and make sure you didn't leave a / or just added /
but that is where your error is at in one or more of them nip files so double check them[COLOR="Silver"]

---------- Post added at 03:05 PM ---------- Previous post was at 03:02 PM ----------

[/COLOR]plus you don't have your char config file set right or you have it pointing to the wrong
char in your manager that is why you are getting this - Loaded default config
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  [D2NT Release] Druid Script skidude 20 17,271 08-25-2012, 01:20 AM
Last Post: comper
  D2NT BoT Gh0sT17 52 2,064 07-31-2012, 11:10 PM
Last Post: comper
  D2nt need help on some stuff wishyq 3 171 07-22-2012, 12:44 PM
Last Post: comper
  Little Help Please? (D2NT) pnsmcgraw 12 272 07-16-2012, 02:46 PM
Last Post: Mythosis
  MasivB's D2NT Simple Unique PickIt masivb 1 118 07-03-2012, 05:03 AM
Last Post: comper
  D2nt - how do i stay in game when sojs sell? brianwalter86 5 356 07-01-2012, 02:02 PM
Last Post: comper
  Nooby D2NT Questions Kieran Wilson 0 129 06-25-2012, 04:35 PM
Last Post: Kieran Wilson
  [D2NT Release]Item Logging with XML 3.0+ skidude 76 14,583 06-25-2012, 01:27 PM
Last Post: masivb
  D2nt Bot jewel pickit/godly item pickit Nightwish 3 233 06-23-2012, 04:18 AM
Last Post: comper
  someone please help my d2nt bot wont kill any bosses mcmullenp4 2 178 06-19-2012, 10:18 AM
Last Post: comper

Forum Jump:


Users browsing this thread: 1 Guest(s)