Not turning variable to an int
Question: I wanted to make an rpg game based of the manga Deadmans Wonderland. I want to
change 'james' the variable which represents strenth, agility etc. It works ok
but it doesnt convert it to a int it keeps it as (hexidecimal I think?) I know
this because I asked it to print james.

Heres the code so far:

    
    
    import random
    import time
    import sys
    global james
    global var
    global var2
    global var3
    global var4
    global var5
    global var6
    global var7
    
    
    def james ():
        print ("Hello and welcome to DeadMans Wounder Land Python Adventure!")
        print ("Hello and welcome to DeadMans Wounder Land Python Adventure!")
        time.sleep (1)
        name = input("The story begins with you: ")
        print ("So" +name+ " You will first need to choose your skill points you can choose from; Streanth, Perception, Endurance, Charisma, Inteligence,   Agility, Luck.")
    
    
        print ("You have 40 points to alocate between 7 skills sets.
        choose now!")
        time.sleep (1)
        var = int(input("What is your streanth?"))
        var2 = int(input("What is your Perception?"))
        var3 = int(input("What is your Endurance?"))
        var4  = int(input("What is your carisma?"))
        var5 =  int(input("What is your Inteligence?"))
        var6 = int(input("What is you Agility?"))
        var7 = int(input("What is your Luck?"))
    
        int(james == var+var2+var3+var4+var5+var6+var7) 
        time.sleep (1)
        james == int(40) 
        if james == 40:
            print ("Well done! You can count to 40! these are valuable skills!")
        else:
            print (james)
            print ("Sorry but your varible is not equal to 40, please boot the game again because i cba to make a loop (: ")
            sys.exit("Do it again!")
    
    james()
    
    #charecter creation over, now the real wounderland starts!
    
    
    print (" You wake up, a dry steanch of sweat hits you, your head hurts.                              You can feel the dry, rough  sheet of this bed stick to you as you sit up and rub your eyes. this is not familiar surroundings...")
    print ("[this is the ooc/oog speach help. to look around type 'look']")
    print ("try it now:")
    if input == "look":
        print (" You look around, you can see a blank prison cell , a dry bed whitch you are sitting on. a toilet and a sink stationed next  to your bed and furter on down the cell you can see a table with 4 of draws.")
        print ("[you can search an item by typing serch.")
    if input == "serch":
        print ("You serch the desk draws...")
        time.sleep (0.5)
        print (".")
        time.sleep (0.5)
        print (".")
        time.sleep (0.5)
        print (".")
        time.sleep (1)
        print ("You found a small leather bag, this bag contains a manual, a credit card of some sort and a small sweet.")
        print ("[type serch again, this might help (: ]")
    


Answer: Try changing this to:

    
    
    jamesValue = var+var2+var3+var4+var5+var6+var7
        time.sleep (1)
        if jamesValue == 40:
            print ("Well done! You can count to 40! these are valuable skills!")
    

and then fixing the subsequent references.

The problems are that James is a function the way you have it set up, and that
you're attempting to assign a value with a comparator ('==' is a question, not
a statement).

