# The code is python
# Why no print "You are neutral"
# Getting syntax error for line 4 but im still code kid who dont know how to fix
good_evil_level = 0
lawful_chaotic_level = 0
def (player_alignment_update):
if lawful_chaotic_level == 0 and good_evil_level == 0:
player_alignment = "neutral"
elif lawful_chaotic_level > 0 and good_evil_level == 0:
player_alignment = "lawful neutral"
elif lawful_chaotic_level == 0 and good_evil_level > 0:
player_alignment = "neutral good"
elif lawful_chaotic_level < 0 and good_evil_level == 0:
player_alignment = "chaotic neutral"
elif lawful_chaotic_level == 0 and good_evil_level < 0:
player_alignment = "neutral evil"
elif lawful_chaotic_level > 0 and good_evil_level > 0:
player_alignment = "lawful good"
elif lawful_chaotic_level < 0 and good_evil_level > 0:
player_alignment = "chaotic good"
elif lawful_chaotic_level > 0 and good_evil_level < 0:
player_alignment = "lawful evil"
elif lawful_chaotic_level < 0 and good_evil_level < 0:
player_alignment = "chaotic evil"
print "You are " + player_alignment
>>384625630
What the fuck. This code is trash.
>>384625630
>if lawful_chaotic_level == 0 and good_evil_level == 0:
player_alignment = "neutral"
You need to press TAB the "player_ali..."
has to me more to the right than the if
>>384625630
go to stack overflow you retard cunt piece of shit
>>384626675
>print "You are " + player_alignment
Also I don't think you need that + there
If you went on the technology board they have code tags for you to use
>>384625630
go read up on how to define a function
>>384626791
you do, or you can use a comma instead
don't quit your day job, OP
>>384625630
Jesus, you're going about this all wrong. Make an empty string to start with, then add their lawful/chaotic string part to it. After that, append their good/evil string to it. If you want to say 'neutral' instead of 'neutral neutral' just add a case for it at the end.
Now you have 6 cases instead of 8. More importantly, you can add more cases without having to raise your number of 'if' statements by a factor of 2.
>>384625630
def (player_alignment_update):
should be
def player_alignment_update():
also >>>/g/
>>384627214
thank you u did it
This is python2.6, right? It works in py3. Did you fuck up your syntax horribly?
Either way, give up on programming anon
>>384627346
Why would you put the name of the function in the brackets? I hope that was just a typo
>>384627397
yep im using 2 should I go to 3
Where's the CS graduate jpg when you need it.
>>384627465
no I'm just bad this is pretty much my third day on the coding job
/tg/ is that way, anon.
>>384627639
>asking 4chan to fix code for your job
im worried for you anonjust look up everything on stackoverflow, worked for me
>>384627610
A grad would at least know how to Google or Stackoverflow.
>>384627610
here
>>384627639
where did you find your coding job if you work so poorly
cringy ass fag, kys
>>384627556
Depends on what you're making.
Also, for the love of god write something that doesn't make your eyes bleed
https://pastebin.com/u284x0VX