Home Artists Posts Import Register

Content

Just spent 6 hours trying to get an if statement to work in a coding project for school. Pretty salty about that since it should be so simple but the dang thing wont work, lmao.

Gave up for the day and starting on the chapters. See you all again in a few hours with the chaps :)

(And look forward to every day this week after wednesday - the new chapters for Steamforged are something I've been working towards for a bit, and they involve Cowl...)

Comments

Anonymous

Html doesn't have the ability for if statements though. 😂 What language you rocking on dude?

Actus

I wish... I'll be honest, I don't entirely know what I'm doing, but I'm using Django, which is a python module. There are template files in Django that are .htmls, and they've got if & for statements in them. Everything works except for this one darn line, hahaha

Anonymous

put some output to make sure you are getting to the if statement. then code the output to what you are comparing. I have coded too many times where i was comparing 2 fields that output as string but actually stored different. So it fails. so then you have to cast both sides of the equation to make sure you are comparing the correct value.