Skript

Forum > Help

creative script [Need Help]

  • 3 posts
    #1 Oct 05, 2013 at 07:29 UTC - 0 likes

    So i am making a skript to help with creative buidling. You can call it like the Paint Program for windows. But anyways i keep on encountering over 20 errors whenever i fix them. So here is my current code:

    command: /stand <Material>:
    	permission: "creative.stand"
    trigger:
    		block below is air:
    		set block below player to argument
    
    command: /edit <material>:
    	permission: "creative.edit"
    trigger:
    		set targeted block to argument
    		
    on leftclick:
    	player is holding a slimeball
    	player has permission "creative.set.paint"
    	set {paint.%player%} to clicked block
    	message "&aYour paint is now &3%type of clicked block%"
    						
    on rightclick:
    	player is holding a slimeball
    	permission: "creative.paint"
    	set targeted block to %type of clicked block%
    	
    options:
    	selector: arrow
    	canvas: white wool
    	
    	
    on leftclick with {@selector}:
    	clicked block is set:
    		cancel event
    		set {point1.%player%} to location of clicked block
    		message "&5Point 1 is now %{point1.%player%}%"
    		
    on rightclick with {@selector}:
    	clicked block is set:
    		cancel event
    		set {point2.%player%} to location of clicked block
    		message "&5Point 1 is now %{point2.%player%}%"
    		
    command /createcanvas {@canvas}
    permission: "creative.blankcanvas"
    trigger:
    {point1.%player%} is set
    {point2.%player%} is set
    		set {_dist.y} to y-coord of {point1.%player%} - y-coord of {point2.%player%}
    		set {_dist.east} to x-coord of {point2.%player%} - x-coord of {point1.%player%}
    		set {_dist.north} to z-coord of {point1.%player%} - z-coord of {point2.%player%}
    		loop blocks from {point1.%player%} to block {_dist.east} meters east of {point1.%player%}:
    			loop blocks from loop-block to block {_dist.north} meters north of loop-block:
    				loop blocks from loop-block-2 to block {_dist.y} below loop-block-2:
    					set loop-block-3 to argument
    					
    on rightclick:
    	player is holding rose red
    	targeted block is {@canvas}
    	set {@canvas} to red wool
    	
    on rightclick:
    	player is holding dandelion yellow
    	targeted block is {@canvas}
    	set {@canvas} to yellow wool
    

    It will help if you can fix the errors and put it in pastebin or something. And make sure you can tell me what im doing wrong.

    Here are my console errors i get: 00:23:35 [INFO] [Skript] Checking for the latest version of Skript... 00:23:35 [SEVERE] [Skript] indentation error: expected 1 tab, but found 2 tabs ( creative.sk, line 9: 'block below is air:') 00:23:35 [SEVERE] [Skript] indentation error: expected 1 tab, but found 2 tabs ( creative.sk, line 10: 'set block below player to argument') 00:23:35 [WARNING] [Skript] Empty configuration section! You might want to inden t one or more of the subsequent lines to make them belong to this section or rem ove the colon at the end of the line if you don't want this line to start a sect ion. (creative.sk, line 8: 'trigger:') 00:23:35 [SEVERE] [Skript] indentation error: expected 1 tab, but found 2 tabs ( creative.sk, line 15: 'set targeted block to argument') 00:23:35 [WARNING] [Skript] Empty configuration section! You might want to inden t one or more of the subsequent lines to make them belong to this section or rem ove the colon at the end of the line if you don't want this line to start a sect ion. (creative.sk, line 14: 'trigger:') 00:23:35 [WARNING] [Skript] Empty configuration section! You might want to inden t one or more of the subsequent lines to make them belong to this section or rem ove the colon at the end of the line if you don't want this line to start a sect ion. (creative.sk, line 47: 'trigger:') 00:23:35 [SEVERE] [Skript] indentation error: expected 0 tabs, but found 2 tabs (creative.sk, line 50: 'set {_dist.y} to y-coord of {point1.%player%} - y-coord of {point2.%player%}') 00:23:35 [SEVERE] [Skript] indentation error: expected 0 tabs, but found 2 tabs (creative.sk, line 51: 'set {_dist.east} to x-coord of {point2.%player%} - x-coo rd of {point1.%player%}') 00:23:35 [SEVERE] [Skript] indentation error: expected 0 tabs, but found 2 tabs (creative.sk, line 52: 'set {_dist.north} to z-coord of {point1.%player%} - z-co ord of {point2.%player%}') 00:23:35 [SEVERE] [Skript] indentation error: expected 0 tabs, but found 2 tabs (creative.sk, line 53: 'loop blocks from {point1.%player%} to block {_dist.east} meters east of {point1.%player%}:') 00:23:35 [SEVERE] [Skript] indentation error: expected 0 tabs, but found 3 tabs (creative.sk, line 54: 'loop blocks from loop-block to block {_dist.north} meter s north of loop-block:') 00:23:35 [SEVERE] [Skript] indentation error: expected 0 tabs, but found 4 tabs (creative.sk, line 55: 'loop blocks from loop-block-2 to block {_dist.y} below l oop-block-2:') 00:23:35 [SEVERE] [Skript] indentation error: expected 0 tabs, but found 5 tabs (creative.sk, line 56: 'set loop-block-3 to argument') 00:23:35 [SEVERE] [Skript] can't understand this event: 'command: /stand <Materi al>' (creative.sk, line 6: 'command: /stand <Material>:') 00:23:35 [SEVERE] [Skript] can't understand this event: 'trigger' (creative.sk, line 8: 'trigger:') 00:23:35 [SEVERE] [Skript] can't understand this event: 'command: /edit <materia l>' (creative.sk, line 12: 'command: /edit <material>:') 00:23:35 [SEVERE] [Skript] can't understand this event: 'trigger' (creative.sk, line 14: 'trigger:') 00:23:35 [SEVERE] [Skript] Can't understand this condition/effect: permission: " creative.paint" (creative.sk, line 25: 'permission: "creative.paint"') 00:23:35 [INFO] [Skript] A new version of Skript is available: 2.0.2 (you're cur rently running 2.0.1) 00:23:35 [SEVERE] [Skript] 'block%' is not an item type (creative.sk, line 26: ' set targeted block to %type of clicked block%') 00:23:36 [SEVERE] [Skript] invalid line - all code has to be put into triggers ( creative.sk, line 45: 'command /createcanvas {@canvas}') 00:23:36 [SEVERE] [Skript] invalid line - all code has to be put into triggers ( creative.sk, line 46: 'permission: "creative.blankcanvas"') 00:23:36 [SEVERE] [Skript] can't understand this event: 'trigger' (creative.sk, line 47: 'trigger:') 00:23:36 [SEVERE] [Skript] invalid line - all code has to be put into triggers ( creative.sk, line 48: '{point1.%player%} is set') 00:23:36 [SEVERE] [Skript] invalid line - all code has to be put into triggers ( creative.sk, line 49: '{point2.%player%} is set') 00:23:36 [SEVERE] [Skript] 'white wool' is not an entity type (creative.sk, line 61: 'set {@canvas} to red wool') 00:23:36 [SEVERE] [Skript] 'white wool' is not an entity type (creative.sk, line 66: 'set {@canvas} to yellow wool')

    Thank you for helping me. New member of skript: CrazyzT

    Come help me with my skript server. Post: http://dev.bukkit.org/bukkit-plugins/skript/forum/misc/58313-a-skript-server/?page=3#p56 IP: 71.197.201.74

    #2 Oct 05, 2013 at 12:00 UTC - 0 likes

    fixed it up for you but you need to start reading the errors like

    • [Skript] indentation error: expected 1 tab, but found 2 tabs ( creative.sk, line 9: 'block below is air:') 00:23:35 (expected 1 tab, but found 2 tabs) means that on line 9 you need to remove 1 tab
    options:
    	selector: arrow
    	canvas: white wool
    
    command /stand <material>:
    	permission: "creative.stand"
    	trigger:
    		block below player is air:
    			set block below player to arg 1
    
    command /edit <material>:
    	permission: "creative.edit"
    	trigger:
    		set targeted block to arg 1
    		
    on leftclick:
    	player has permission "creative.set.paint":
    		player is holding a slimeball:
    			set {paint.%player%} to clicked block
    			message "&aYour paint is now &3%type of clicked block%"
    						
    on rightclick:
    	player has permission "creative.paint":
    		player is holding a slimeball:
    			set {_clickblock} to clicked block
    			set targeted block to {_clickblock}
    	
    	
    on leftclick with {@selector}:
    	clicked block is set:
    		cancel event
    		set {point1.%player%} to location of clicked block
    		message "&5Point 1 is now %{point1.%player%}%"
    		
    on rightclick with {@selector}:
    	clicked block is set:
    		cancel event
    		set {point2.%player%} to location of clicked block
    		message "&5Point 1 is now %{point2.%player%}%"
    		
    command /createcanvas <material>:
    	permission: "creative.blankcanvas"
    	trigger:
    		{point1.%player%} is set
    		{point2.%player%} is set
    		set {_dist.y} to y-coord of {point1.%player%} - y-coord of {point2.%player%}
    		set {_dist.east} to x-coord of {point2.%player%} - x-coord of {point1.%player%}
    		set {_dist.north} to z-coord of {point1.%player%} - z-coord of {point2.%player%}
    		loop blocks from {point1.%player%} to block {_dist.east} meters east of {point1.%player%}:
    			loop blocks from loop-block to block {_dist.north} meters north of loop-block:
    				loop blocks from loop-block-2 to block {_dist.y} below loop-block-2:
    					set loop-block-3 to arg 1
    					
    on rightclick:
    	player is holding rose red:
    		targeted block is {@canvas}:
    			set targeted block to red wool
    	
    on rightclick:
    	player is holding dandelion yellow:
    		targeted block is {@canvas}:
    			set targeted block to yellow wool
    
    Last edited Oct 05, 2013 by guruflex
    #3 Oct 05, 2013 at 18:14 UTC - 0 likes

    @guruflex: Go

    Thank you i will try to not mess up tabs anymore. Im just trying to learn because ima set up an Skript Server. and if i can ask you. Would you like to skript for it? We could use more people.

  • 3 posts

You must login to post a comment. Don't have an account? Register to get one!