NEWTON

NEWTON


Popular tags

    Cairo error for Unexpected '.' after ... which is future

    Asked

    5 months ago

    7

    views


    0

    I have the following code:

    @external

    func updateCurrNum{syscall_ptr : felt*, pedersen_ptr : HashBuiltin*, range_check_ptr}(updatedNum : felt):

    let (isOwner) = isOwner()

    assert isOwner = 1

    ...

    And I am getting this error:

    Unexpected '.' after 'main.updateCurrNum.isOwner' which is future.

    let (isOwner) = isOwner()

    ^*****^

    What am I doing wrong?

    This question was originally posted on Triality

      cairostarknet

    1 answers

    0

    The problem is that you setting the variable name to the same name as the function. You can change to the following:

    @external

    func updateCurrNum{syscall_ptr : felt*, pedersen_ptr : HashBuiltin*, range_check_ptr}(updatedNum : felt):

    let (ownerBool) = isOwner()

    assert ownerBool = 1

    ...

    This answer was originally posted on Triality

    answered

    6 months ago

    Your answer

    NEWTON

    NEWTON