Cant recgonise the type and cant understand Event

  • Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the community!

    Now, what are you waiting for? Join the community now!

  • LOOKING FOR A VERSION OF SKRIPT?

    You can always check out skUnity Downloads for downloads and any other information about Skript!

Status
Not open for further replies.

Xerox0987

Member
Feb 13, 2022
1
0
1
Hello i have an issue with my skript and i cant fix it ive searched everywhere discord,goggle,minehut but cant find an answer btw im new to skripting
this is my code:
```command /generator <integer>:
aliases: /gen, /itemspawner
trigger:
set {wait} to arg-1
Drop(player,arg-1)

function Drop({_player}: {_player}, wait: number):
set {drop} to {_player} location
add 0.5 to y-coordinate of {drop}
drop {_player} held item at {drop}```
and this is the error messages:
Cannot recognise the type '{_player}' (generator.sk, line 7: function Drop({_player}: {_player}, wait: number):
and:
can't understand this event: '```command /generator <integer>' (generator.sk, line 1: ```command /generator <integer>:
if you could help that would be amazing :emoji_grinning:
 
in function() variables is already local so you have to just use function Brabra(player: player, wait: number)
when you use it you can use {_player} and {_wait}

Code:
command /generator <integer>:
    aliases: /gen, /itemspawner
    trigger:
        set {wait} to arg-1
        Drop(player,arg-1)

function Drop(player: player, wait: number):
    set {drop} to {_player} location
    add 0.5 to y-coordinate of {drop}
    drop {_player} held item at {drop}
 
its location of %player% or %player%'s location
if you put the player in a var, the 's stays the same

Code:
drop {_player}'s held item at {_player}'s location ~ vector(0, 0.5, 0)
 
Status
Not open for further replies.