Hi @filip I keep getting this message and I can’t figure out where my error is. chhers
Kim
truffle(ganache)> instance.getMessage()
‘helloWorld’
truffle(ganache)> instance.setMessage(“kim”)
Thrown:
evalmachine.:0
instance.setMessage(“kim”)
^
TypeError: instance.setMessage is not a function
at evalmachine.:0:10
at sigintHandlersWrap (vm.js:269:15)
at Script.runInContext (vm.js:124:14)
at runScript (C:\Users\dread\AppData\Roaming\npm\node_modules\truffle\build\webpack:\packages\core\lib\console.js:213:1)
at Console.interpret (C:\Users\dread\AppData\Roaming\npm\node_modules\truffle\build\webpack:\packages\core\lib\console.js:228:1)
at ReplManager.interpret (C:\Users\dread\AppData\Roaming\npm\node_modules\truffle\build\webpack:\packages\core\lib\repl.js:123:1)
at bound (domain.js:419:14)
at REPLServer.runBound [as eval] (domain.js:432:12)
at REPLServer.onLine (repl.js:716:10)
at REPLServer.emit (events.js:223:5)
here is my code…
pragma solidity 0.5.12;
contract Helloworld {
string message = “helloWorld”;
function getMessage () public view returns (string memory) {
return message;
}
function setMessage (string memory newMessage) public {
message = newMessage;
}
}