POST
|
Hello, just yesterday, I downloaded the 30 day free trial of CityEngine 2014 and I am having several problems, which I cannot combine in one thread. So as my first problem I would like to discuss, has to do with receiving a NullPointerException in 2 areas. Firstly, in the Facade Wizard, I receive a NullPointerException when I have "Immediate Save and Generate on Selected Shape" turned on. Secondly, the same error happens when I try to create a new facade from selection. Now, since I have some oop programming background, I know what a NullPointerException is. In layman's terms, it just basically means that the application was trying to access a variable which has not been assigned any data to it. So, in that note, one would think to tell the user to make sure that the facade in the viewport is selected before clicking on "New Facade from Selection", and be sure that the shape object in the viewport is selected and has the rule assigned to it before using the "Immediate Save and Generate on Selected Shape" feature. Well to answer these 2 checks before someone jumps the gun and tells me to check those 2 things are true, obviously if I did not have a facade selected in the viewport, the "New Facade from Selection" button would be disabled, and as for the "Immediate Save and Generate on Selected Shape" feature, not only did I double checked this, I tripled checked it, and everything is kosher except for the fact that a NullPointerException is thrown in the log. Worst yet, this causes to disable both the new facade from selection and save facade icons in the Facade Wizard, and the only solution is to close the Wizard and reopen it, which you lose all your preshish hard work that you have done in the wizard. So I am really lost here, because I cannot figure out what is going on except maybe it is a bug?
... View more
10-11-2014
04:39 AM
|
0
|
0
|
1567
|
POST
|
And for the record, every conditional always includes some sort of "else" condition....otherwise there wouldn't be a conditional to begin with Daniel, if you are not refering to only to CityEngine, then I have to disagree with every conditional statment includes some sor of else condition. For example, a snippet of C++ code could have this type of situation... your playing a game of blackjack and it is your turn. I have seen where games, like Blackjack, are programmed in an event handling system where the code constantly loops endlessly until the game has won or the play has quit. here is an example of psuedo code...
gameOver = false
while(!gameOver) {
if PlayerTurn == "Computer" {
computer takes its turn
else {
getevent(&event)
if event == DRAWCARD
drawCard();
elif: event == MAKEBID
makeBid();
elif: event == STAND {
stand()
PlayerTurn = "Computer";
}
}
as you can see in this pethetic poor example, you get the jist, if it is the human player's turn and he does not make a move, there is no else statment that causes the player to break out of his turn until he tells the program he wishes to stand. Thus causing the game to continuously loop in this theory.... did the game end --> no is it the computer's turn --> no else, must be player's turn did the player ask to draw a card from the deck --> no did the player ask to make a bet --> no did the player ask to stand --> no did the game end.... and so on...
... View more
07-10-2012
03:50 PM
|
0
|
0
|
255
|
POST
|
Hi, My first question is: Why is it not possible to instruct other rules prior to a conditional statement without the script marking the conditional statment as an error? ex:
alignScopeToAxes(y)
s(assetSize("assets/facades/gazeboBeam_1.obj", "x"),assetSize("assets/facades/gazeboBeam_1.obj", "y"),assetSize("assets/facades/gazeboBeam_1.obj", "z"))
i("assets/facades/gazeboBeam_1.obj")
case pos == "center_xz":
center(xz)
case pos == "right":
t('scope.sx - (assetSize("assets/facades/gazeboBeam_1.obj", "x") / 2), 0, 0)
else:
DoNothing
My second question: With the same code above, if I do not include an else statement, that as well causes the script to mark it as an error. Why is this so? Haven't the developers of CityEngine ever heard of if statements that do not include an else condition?
... View more
07-08-2012
11:10 AM
|
0
|
3
|
2228
|
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:23 AM
|