Skip to content

SetCampaignString() to "" (empty string)

Thought I would finally get rid NBDE.
I have a few spots where I'm calling SetCampaignString(DB, NAME, ""), to simply mark that variable as empty.
The log shows this when it's ran:
SQL ERROR: [1299] abort at 12 in [replace into db (vartype, varname, playerid, payload, compressed) values (?, ?, ?, ?, ?)]: NOT NULL constraint failed: db.payload while executing (unknown)

I bring this up because my code uses the fact that calling GetCampaignString on some undefined variable will return "".
Sure I can add checks for some alternative empty string character. It's just not as optimal.

Comments

  • MrWizardMrWizard Member Posts: 1
    Hi, I know I'm a few days late, but I just want to point out that DeleteCampaignVariable() will have the same effect. SetCampaignString() probably doesn't support a blank string because it would be redundant, BUT it's definitely still a bug!
  • ForSeriousForSerious Member Posts: 466
    That would probably have been easier than my work-around. I changed all the times I set it to "" into " ", then added checks for " " all the places that I was already checking for "";
Sign In or Register to comment.