Jump to content

Help , no idea whats wrong ?


pete_parker

Recommended Posts

2 hours ago, pete_parker said:
on place:
  player is holding obsidian:
  	if "%region at player%" contains "cpvp":
    	set {blockplace} to obsidian
    if {blockplace} is not set:
      cancel event

 

player is holding obsidian must have a colon after it (also indent it). I edited the quote 

Link to comment
Share on other sites

21 hours ago, itsKimo said:

player is holding obsidian must have a colon after it (also indent it). I edited the quote 

thats a lie, only if it has an if before it it needs to have a colon, yes you can still include colons without the if, its not required

Developer

 

Joined Minecraft in 2010 on PC

Joined Minehut in August 2016

1 year Skript experience

2 months Java experience

5 months Javascript experience

 

Link to comment
Share on other sites

this is how i would do it
 

on place of obsidian:
 	if "%region at player%" contains "cpvp":
		set {blockplace} to obsidian
	if {blockplace} is not set:
		cancel event

this should work, however, you never provided any context on what you wanted to do 

Developer

 

Joined Minecraft in 2010 on PC

Joined Minehut in August 2016

1 year Skript experience

2 months Java experience

5 months Javascript experience

 

Link to comment
Share on other sites

On 9/15/2021 at 8:35 PM, emopediaMC said:

this is how i would do it
 

on place of obsidian:
 	if "%region at player%" contains "cpvp":
		set {blockplace} to obsidian
	if {blockplace} is not set:
		cancel event

this should work, however, you never provided any context on what you wanted to do 

kinda worked look below for video :


also some context on this :
Making a region for cpvp only , so say my west side of my map is all cpvp , but my east side of 
the map is no cpvp , so in the west side of the map you can only place obi down , bc its a hcf and you cant normally place 
obi around , but in cpvp you need to place obi , so idk i need help with this , idk why its not working , i only have some knowledge of skript , so just asking around

 

here is my code now i kinda fix it up to represent how i want it to work , but it wont 
cancel the block place outside the region let alone broadcast "working2"
 

on place of obsidian:
  if "%region at player%" contains "cpvp":
    set {blockplace} to obsidian
    broadcast "working"
    wait 10 seconds
    set event-block to air 
  if {blockplace} is not set to obsidian:
    cancel event
	broadcast "working2"

Video of it not working right: 
https://imgur.com/sc7EhM8

Edited by pete_parker
Link to comment
Share on other sites

2 minutes ago, itsKimo said:

try this

on place of obsidian:
  if "%region at player%" contains "cpvp":
    set {blockplace} to obsidian
    broadcast "working"
    wait 10 seconds
    set event-block to air 
  else:
    cancel event
    broadcast "working2"

 

12 hours ago, pete_parker said:

kinda worked look below for video :


also some context on this :
Making a region for cpvp only , so say my west side of my map is all cpvp , but my east side of 
the map is no cpvp , so in the west side of the map you can only place obi down , bc its a hcf and you cant normally place 
obi around , but in cpvp you need to place obi , so idk i need help with this , idk why its not working , i only have some knowledge of skript , so just asking around

 

here is my code now i kinda fix it up to represent how i want it to work , but it wont 
cancel the block place outside the region let alone broadcast "working2"
 

on place of obsidian:
  if "%region at player%" contains "cpvp":
    set {blockplace} to obsidian
    broadcast "working"
    wait 10 seconds
    set event-block to air 
  if {blockplace} is not set to obsidian:
    cancel event
	broadcast "working2"

Video of it not working right: 
https://imgur.com/sc7EhM8

 

12 hours ago, pete_parker said:

kinda worked look below for video :


also some context on this :
Making a region for cpvp only , so say my west side of my map is all cpvp , but my east side of 
the map is no cpvp , so in the west side of the map you can only place obi down , bc its a hcf and you cant normally place 
obi around , but in cpvp you need to place obi , so idk i need help with this , idk why its not working , i only have some knowledge of skript , so just asking around

 

here is my code now i kinda fix it up to represent how i want it to work , but it wont 
cancel the block place outside the region let alone broadcast "working2"
 

on place of obsidian:
  if "%region at player%" contains "cpvp":
    set {blockplace} to obsidian
    broadcast "working"
    wait 10 seconds
    set event-block to air 
  if {blockplace} is not set to obsidian:
    cancel event
	broadcast "working2"

Video of it not working right: 
https://imgur.com/sc7EhM8

 

3 minutes ago, itsKimo said:

try this

on place of obsidian:
  if "%region at player%" contains "cpvp":
    set {blockplace} to obsidian
    broadcast "working"
    wait 10 seconds
    set event-block to air 
  else:
    cancel event
    broadcast "working2"

 

 

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...