What's new
  • Visit Rebornbuddy
  • Visit Resources
  • Visit API Documentation
  • Visit Downloads
  • Visit Portal
  • Visit Panda Profiles
  • Visit LLamamMagic

critical bug with while / if statements

:D Sorry.
"Intellectuals solve problems, geniuses prevent them."
-Albert Einstein

Also. your "fix" is fine in a junk profile but not in the scale of profile i'm making. The reason, i have to block the code off in sections for different scenarios. It can't just be one long running mess of scattered ifs.

I'll explain it as simply as possible.

My profile does the following scenarios.

Scenario 1: Fresh game
Load new quest. starting in town. it does normal broken blade quest line and gets into the festering woods.
Once there it starts the walk through the zone. visiting every tile that can have a special event object or dungeon entrance. First entering CoA then entering HR then leaving the game. (doing all special events it encounters along the way before clearing the dungeons)

Scenario 2: Resumes Game
Resumes game from inside HR
Clears HR exits dungeon
depending on where you exit (where on the map you are of the 3 possibilities) it takes 3 possible paths to go back to CoA side and find the entrance to CoA
clear CoA exit game

Scenario 3: Resume Game
Same as scenario 2 but logs in inside CoA and clear it, then finds HR and clears it.

rinse and repeat.

because of this, it's a varying profile, it's not a set do this in this order profile. nested blocks of code are required.

Code:
if (in town){
  use waypoint
}

// resumed game
while (in coA){
  clear dungeon
  exit
  if (location1){
    walk path 1 looking for hr
    if (hr1 found) {
      enter dungeon clear leavegame
    }
    if (hr2 found) {
      enter dungeon clear leavegame
    }
    if (hr3 found) {
      enter dungeon clear leavegame
    }
  }
  // repeat for location 2 and 3 of coa
}
// repeat for if they resume game inside WR except coa is the target
// Normal quest line here do the starting quest and make way to festering woods
// walk to all the different tiles of the map and explore dungeons etc.
//
// 
//

The breaking apart the nested stuff into 3 different ifs will work for the standard quest part (fresh from new game) but it wont for the resume parts because those are inside a while (or if doesn't matter). The single while / if makes any of the code inside (working code thats used in the standard run) not work because it triggers that bug.

hopefully some of that made sense. so yeah there's a work around for "some" of it. but not all of it. hence this thread.
 
Yes ofc. Haha i dont see the problem, ive posted solutions for both your problems now!

Edit: Seems you dont understand what im trying to say... There probably is no bug, just bad coding!

I've proven there's a bug. With examples. Simply because you fail to understand the need for basics of programming is not my problem. Bad programming, you mean proper programming.

Nested tags work in a lot of cases in DB as is. This means it's something that's there on purpose to be used! I found specific scenarios where it's broken. What are you failing to see? It's like talking to a brick wall.
 
Also. your "fix" is fine in a junk profile but not in the scale of profile i'm making. The reason, i have to block the code off in sections for different scenarios. It can't just be one long running mess of scattered ifs.

I'll explain it as simply as possible.

My profile does the following scenarios.

Scenario 1: Fresh game
Load new quest. starting in town. it does normal broken blade quest line and gets into the festering woods.
Once there it starts the walk through the zone. visiting every tile that can have a special event object or dungeon entrance. First entering CoA then entering HR then leaving the game. (doing all special events it encounters along the way before clearing the dungeons)

Scenario 2: Resumes Game
Resumes game from inside HR
Clears HR exits dungeon
depending on where you exit (where on the map you are of the 3 possibilities) it takes 3 possible paths to go back to CoA side and find the entrance to CoA
clear CoA exit game

Scenario 3: Resume Game
Same as scenario 2 but logs in inside CoA and clear it, then finds HR and clears it.

rinse and repeat.

because of this, it's a varying profile, it's not a set do this in this order profile. nested blocks of code are required.

Code:
if (in town){
  use waypoint
}

// resumed game
while (in coA){
  clear dungeon
  exit
  if (location1){
    walk path 1 looking for hr
    if (hr1 found) {
      enter dungeon clear leavegame
    }
    if (hr2 found) {
      enter dungeon clear leavegame
    }
    if (hr3 found) {
      enter dungeon clear leavegame
    }
  }
  // repeat for location 2 and 3 of coa
}
// repeat for if they resume game inside WR except coa is the target
// Normal quest line here do the starting quest and make way to festering woods
// walk to all the different tiles of the map and explore dungeons etc.
//
// 
//

The breaking apart the nested stuff into 3 different ifs will work for the standard quest part (fresh from new game) but it wont for the resume parts because those are inside a while (or if doesn't matter). The single while / if makes any of the code inside (working code thats used in the standard run) not work because it triggers that bug.

hopefully some of that made sense. so yeah there's a work around for "some" of it. but not all of it. hence this thread.
Lol If you want it to run like that, why not simply make it into a plugin. That would be alot more easy then scramble with XML since its a pretty worthless language.
I hope they adds support for LUA one day! :D

Anyway, i see your problem now. What i would have done it using DBE or my plugin and loading different profiles to different scenarios. After that profile is done, you simply just have to load the "main" profile and that would make it leave the game.

But i do see your problem atm! If you would have posted this problem instead of those other profiles i would approached it differently!
You have to excuse me! But can you see the solution that i posted for now?
 
Lol If you want it to run like that, why not simply make it into a plugin. That would be alot more easy then scramble with XML since its a pretty worthless language.
I hope they adds support for LUA one day! :D

Anyway, i see your problem now. What i would have done it using DBE or my plugin and loading different profiles to different scenarios. After that profile is done, you simply just have to load the "main" profile and that would make it leave the game.

But i do see your problem atm! If you would have posted this problem instead of those other profiles i would approached it differently!
You have to excuse me! But can you see the solution that i posted for now?

I do not use plugins and I don't want to require plugins to use my profiles. I feel DB will acknowledge the bug and want to correct it (at least i hope so considering every single support thread they tell you to disable plugins!)

Yes your workaround was valid for a basic profile. Sorry for the confusion. It was just a lot more simple to post a tiny sarkoth profile to illustrate the issue (easy for them to reproduce it on a very short run)
 
I do not use plugins and I don't want to require plugins to use my profiles. I feel DB will acknowledge the bug and want to correct it (at least i hope so considering every single support thread they tell you to disable plugins!)

Yes your workaround was valid for a basic profile. Sorry for the confusion. It was just a lot more simple to post a tiny sarkoth profile to illustrate the issue (easy for them to reproduce it on a very short run)
Yeah i see, but it would be 100% possible :)

How ever, i dont know if they ever will support anything else then orderbot :S But i hope for your sake they start to look how the profile system works as a whole.
But you have to agree that using LUA, this would never have happend!
 
Yeah i see, but it would be 100% possible :)

How ever, i dont know if they ever will support anything else then orderbot :S But i hope for your sake they start to look how the profile system works as a whole.
But you have to agree that using LUA, this would never have happend!

Yep. But lua is a real language. XML is simply a data structure. the "language" is the parser behind the scenes that DB is using to interpret the xml
 
Yep. But lua is a real language. XML is simply a data structure. the "language" is the parser behind the scenes that DB is using to interpret the xml
OFC i know that. But i would solve alot of things instead of using xml....
Thats just what im saying!
 
Back
Top