I downloaded the script: see how many errors you can spot. (I saw three)
function useItem(x,y,z,itemId255,blockId2,side)
{
Block.defineBlock(501, "Oh Ya", [[4, 1]])//Your Code Here
}
function attackHook(attacker, victim)
{
BlockdefineBlock(999, "test", [[9, 9]])//Your Code Here
}
function modTick()
{
//Your Code Here
}
I downloaded the script: see how many errors you can spot. (I saw three)
function useItem(x,y,z,itemId255,blockId2,side)
{
Block.defineBlock(501, "Oh Ya", [[4, 1]])//Your Code Here
}
function attackHook(attacker, victim)
{
BlockdefineBlock(999, "test", [[9, 9]])//Your Code Here
}
function modTick()
{
//Your Code Here
}
idk if this is an error but there isn't any if statement in both hooks.
Rollback Post to RevisionRollBack
+1 Me If I Helped You!
Follow Me On Twitter: @shadowdude246
Not an error. The fact that you can't spot the three obvious errors earns you an EPIC FAIL, WILL NOT REPLY AGAIN rating.
wow I Saw them, I was just being derpy. They are: incorrect use of function useItem, incorrect area to put Block.defineBlock, and missing semicolons after the Block.defineBlock statements. I did not miss them, I just forgot to write them.
Rollback Post to RevisionRollBack
+1 Me If I Helped You!
Follow Me On Twitter: @shadowdude246
first WORKING mod afew bugs but it works jst use the item id i listed and enjoy its a spawner
function useItem(x,y,z,itemId255,blockId2,side)
{
Block.defineBlock(16, "Oh Ya", [[4, 1]])//Your Code Here
}
function attackHook(attacker, victim)
{
Block.defineBlock(21, "test", [[1, 11]])//Your Code Here
}
function modTick()
{
//Your Code Here
}
This is much better than the previous one, although it's still not very good (you re-define the block every time someone touches a block, which means that 1) you waste time and 2) when MCPE starts, all your blocks will turn into Update blocks since the player hasn't touched any blocks yet)
It seems like you are beginning to understand ModPE scripts, but you might want to take a few JavaScript tutorials before creating ModPE scripts. I recommend Codecademy or w3schools. (I learned from JavaScriptKit, but that tutorial is outdated)
When you know functions and loops, you should be able to write much better scripts.
wow I Saw them, I was just being derpy. They are: incorrect use of function useItem, incorrect area to put Block.defineBlock, and missing semicolons after the Block.defineBlock statements. I did not miss them, I just forgot to write them.
OK, we are really nerding out here, but
- You can actually define a block inside useItem. That won't work for very long, though: see above
- And yes, you can put a call to defineBlock inside attackHook also - again, it won't work for very long
- Semicolons, while encouraged, are optional in JavaScript
- The errors that I noticed:
- Both Block IDs are greater than 255. BlockLauncher will simply refuse to do anything on the calls to Block.defineBlock
- Block.defineBlock is missing a dot (he spelled it "BlockdefineBlock"
I downloaded the script: see how many errors you can spot. (I saw three)
function useItem(x,y,z,itemId255,blockId2,side)
{
Block.defineBlock(501, "Oh Ya", [[4, 1]])//Your Code Here
}
function attackHook(attacker, victim)
{
BlockdefineBlock(999, "test", [[9, 9]])//Your Code Here
}
function modTick()
{
//Your Code Here
}
no problem with functions, but missing . after block, and I have to ask myself
"can block Id exceed 255? doesnt day have only 00 to ff?"
And I think no prob with ; cuz javascript will add it by it self,
and Im not sure he is meaning if itemId==255&&blockId==2
so I found two(blockId, missing.).
okay evrybody first thx 500 for support second me fix and third to pocket edition miner if u can turn items into blocks than yes there is more script14551
.HI
item(id==501
:/
Click Banner to SUBSCRIBE!!! I'm in the Team Flame Clan!!! Click that little green arrow!! -------------->
+1 Me If I Helped You!
Follow Me On Twitter: @shadowdude246
Not an error. The fact that you can't spot the three obvious errors earns you an EPIC FAIL, WILL NOT REPLY AGAIN rating.
+1 Me If I Helped You!
Follow Me On Twitter: @shadowdude246
This is much better than the previous one, although it's still not very good (you re-define the block every time someone touches a block, which means that 1) you waste time and 2) when MCPE starts, all your blocks will turn into Update blocks since the player hasn't touched any blocks yet)
It seems like you are beginning to understand ModPE scripts, but you might want to take a few JavaScript tutorials before creating ModPE scripts. I recommend Codecademy or w3schools. (I learned from JavaScriptKit, but that tutorial is outdated)
When you know functions and loops, you should be able to write much better scripts.
OK, we are really nerding out here, but
- You can actually define a block inside useItem. That won't work for very long, though: see above
- And yes, you can put a call to defineBlock inside attackHook also - again, it won't work for very long
- Semicolons, while encouraged, are optional in JavaScript
- The errors that I noticed:
- Both Block IDs are greater than 255. BlockLauncher will simply refuse to do anything on the calls to Block.defineBlock
- Block.defineBlock is missing a dot (he spelled it "BlockdefineBlock"
no problem with functions, but missing . after block, and I have to ask myself
"can block Id exceed 255? doesnt day have only 00 to ff?"
And I think no prob with ; cuz javascript will add it by it self,
and Im not sure he is meaning if itemId==255&&blockId==2
so I found two(blockId, missing.).
Moving to the proper section.
The golden age: it's not the game, it's you ⋆ Why Minecraft should not be harder ⋆ Spelling hints