[Nevermind] Disregard. Sorry

SixophreniaSixophrenia Member Posts: 7
edited February 2018 in Smart Contracts and Dapps
There was one issue. in my post. I used "address" as the type. But I could have swore I tried using the contract's name as the type before.
oh well. It works now.

When instantiating a contract, it looks like it needs an address as an argument.
Why is that?
pragma solidity ^ 0.4.18; contract gemsToken { function gemsToken(){ } } contract SoulPyramid{ gemsToken souleculeGemsSource; address addresso; function SoulPyramid(address addresso) public{ souleculeGemsSource = gemsToken(addresso); } }

Why does one of these factory/sub-contract contract pairs compile, but the other doesn't. There are no changes except names and then other variables functions around them.

The one that doesn't work: https://pastebin.com/Rcm7P0ie
The very simple one that doesn't: https://pastebin.com/eWAHG3PT

I get the error "browser/fullsoul.sol:40:28: TypeError: Exactly one argument expected for explicit type conversion."
even when I simplify the code that doesn't work to just the functions and variables of concern, it still doesn't work but with the same error.
Post edited by Sixophrenia on
Sign In or Register to comment.