Require(msg.value >= 100000000000000000 wei, 'Please enter a number within the provided range') įor( uint i = 0 i <= uint(users.length) i++) Require(msg.sender = manager, 'You are not the manager of this game') But when I try to run the function in remix it returns an error as following: VM error: invalid opcode.ĭebug the transaction to get more information.įollowing is my code: pragma solidity >=0.5.0 Otherwise the function will add the new player to a mapping object called players. the function will check if this player is already exist, if he/she exists in the game, the function will automatically topup the balance of that particular player. I am trying to create a function called join that lets players join the game.
0 Comments
Leave a Reply. |