Aller au contenu

Photo

Quick Fix? Parsing Variable List?


  • Veuillez vous connecter pour répondre
8 réponses à ce sujet

#1
Morbane

Morbane
  • Members
  • 1 883 messages
 
void main()
{
object oObelisk = OBJECT_SELF;
location lLoc = GetLocation(oObelisk);
effect eHB = EffectNWN2SpecialEffectFile("fx_hag_spawn01", oObelisk, lLoc) ApplyEffectToObject(DURATION_TYPE_INSTANT, eHB, oObelisk); //This line has the error: Parsing Variable List
}

I haven't been crunching code for a while - what am I missing here?:blink:

Modifié par Morbane, 14 mars 2011 - 09:46 .


#2
Morbane

Morbane
  • Members
  • 1 883 messages
:blink::blink::blink::blink::blink::blink::blink::blink::blink::blink::blink::blink::blink::blink::blink::blink::blink::blink::blink::blink::blink::blink::blink::blink::blink::blink::blink::blink::blink::blink::blink:Found it - so dumb - i had no semi colon after the previous line where the error was getting flagged

Modifié par Morbane, 14 mars 2011 - 09:47 .


#3
MasterChanger

MasterChanger
  • Members
  • 686 messages
We've all been guilty of overlooking something like that and left wondering whether our eyes were deceiving us.

It's very common for an error to actually show up on a line below it for exactly this reason of forgetting semi-colons and other similar typos. Therefore, one easy way to tell where an error actually originates is to comment out lines above your error and then see what line the error is on after re-compiling.

#4
M. Rieder

M. Rieder
  • Members
  • 2 530 messages
Another very insidious error happened to me the other day. I was working on a script and made an error, then put the script in a .hak and associated it with my module. When the script did't work, I went back to fix it, without first removing it from the .hak and the script wouldn't compile no matter what I did. Apparently the compiler looks at the .hak version of a script before the one you are working on. Drove me bonkers unitl I figured it out.

#5
Dann-J

Dann-J
  • Members
  • 3 161 messages
I sometimes get caught out using a single = instead of a double == in 'if' statements. Or forgetting which scripting language I'm using and typing <> instead of != for 'not equal'.

#6
_Knightmare_

_Knightmare_
  • Members
  • 643 messages

DannJ wrote...

I sometimes get caught out using a single = instead of a double == in 'if' statements.


I too often make the dyslexic version of this same mistake, using == when I want =

ie.

object oSomething == GetWhatever();

Agreed we're all guilty of making those simple mistakes and then pulling out our hair trying to figure out what went wrong.

Modifié par _Knightmare_, 16 mars 2011 - 03:49 .


#7
GhostOfGod

GhostOfGod
  • Members
  • 863 messages
Or when you just accidentally type two letters of a function reversed. I do it with the word "Object" all the time for some reason:

CreateItemOnOjbect

Takes me forever to find em sometimes.

#8
Morbane

Morbane
  • Members
  • 1 883 messages
A reality no doubt - typos and syntax errors can be invisible until you ask someone to look at your code then BAM! you find it. I guess that comes from; once posted a question is played out in our minds as to what the answer might be - until you get an answer or BAM - I almost believe that it makes coding more fun - but then again dyslexic typos and syntax slip ups are the most frustrating to expose -= the fixing part may remain the fun part - its always nice to debug your own code and get adequate results.

#9
M. Rieder

M. Rieder
  • Members
  • 2 530 messages
I like when I make syntax errors in my code and it makes money shoot out of my floppy drive (only reason I still have one installed).