Hi all, This is the very first time I try this function and I’m finding it a little hard to use.
feature.on('click', e => console.log(e.player.wallet)
player.hasEthereumNFT(0x7be8076f4ea4a4ad08075c2508e481d6c946d12b, , (hasNFT)=>player.teleportTo(E@866E,13N,6.5U))
)
As you can see I wanna telport all users that have one of the NFTs from my smart contract to a private room in the parcel.
The console tells me there’s some syntax problems here, and I honestly don’t know how to fill the tokenId field of the function because I should add 10.000 ids…
Is there a way to make that field optional?
And what else looks wrong in my code?
Thanks in advance!
Then I should probably use the collection’s API to check ownership, but the CV scripting engine keeps throwing syntax error to my fetch script (endpoint answers with boolean ture/false and works properly from the browser):
var allow = false
feature.on('click', e => console.log(e.player.wallet)
fetch('https://adm.cryptohodlers.io/api/v1/users/ownership/'+e.player.wallet)
).then(function(response) {
allow = response
console.log(allow)
}