16
Technical forum / Compiler Bugs?
« on: September 24, 2006, 05:23:04 AM »
Hi Mnemonic,
I think I came across two bugs in the compiler:
1. The compiler (wme_comp.exe) complains when I use the following:
However, it allows:
Shouldn't Game.SelectedItem.Name be permitted?
2. In the following "if" statement...
...if SelItem is null, shouldn't the conditional immediately evaluate to false, meaning (SelItem.GetHoverCursor() == null) would never be evaluated?
When I compile my game and run it, the console prints errors like crazy because it's trying to evaluate SelItem.GetHoverCursor() even when SelItem is null.
Thanks! Please let me know if you need any additional information.
Greg
PS: For an Item object, what is the difference between the "standard" cursor and "Normal" cursor, e.g. Item.GetCursor() vs. Item.GetNormalCursor()?
PPS: Have you considered adding Item.{Has,Remove}{Normal,Hover}Cursor() to be consistent with Item.{Has,Remove}Cursor()?
I think I came across two bugs in the compiler:
1. The compiler (wme_comp.exe) complains when I use the following:
Code: [Select]
Game.SelectedItem.Name
However, it allows:
Code: [Select]
var SelItem = Game.SelectedItem;
SelItem.Name
Shouldn't Game.SelectedItem.Name be permitted?
2. In the following "if" statement...
Code: [Select]
if (SelItem != null && SelItem.GetHoverCursor() == null) ...
...if SelItem is null, shouldn't the conditional immediately evaluate to false, meaning (SelItem.GetHoverCursor() == null) would never be evaluated?
When I compile my game and run it, the console prints errors like crazy because it's trying to evaluate SelItem.GetHoverCursor() even when SelItem is null.
Thanks! Please let me know if you need any additional information.
Greg
PS: For an Item object, what is the difference between the "standard" cursor and "Normal" cursor, e.g. Item.GetCursor() vs. Item.GetNormalCursor()?
PPS: Have you considered adding Item.{Has,Remove}{Normal,Hover}Cursor() to be consistent with Item.{Has,Remove}Cursor()?