#Duel Skript requests
1 messages · Page 1 of 1 (latest)
have you tried debugging?
No but I don't see how I would do that
broadcast some stuff
- add messages after conditions so you can see if they pass/fail
- broadcast values to see what they are
So I've changed
function DuelRequests(p: player):
create a gui with virtual chest inventory with 5 rows named " &e&lDuel Requests":
# Do something please pookie :)
loop {duel.request::*}:
broadcast "looping through duel requests for %loop-value%"
if {duel.request::%loop-value%} is true:
broadcast "duel request for %loop-value% is set"
add 1 to {_slot}
format gui slot {_slot} with written book of mending named "&a%loop-value%" with lore "&7Click to accept the duel request from &a%loop-value%."
```
and this is all its getting too
so broadcast the variable
and see what it is
ah
youre using loop-value, i think you want loop-index
although, you can filter it to avoid looping extranous stuff in the first place
loop {duel::*} where [input = true]:
Ah yes that shows correctly in the gui thanks
The thing is its saying "There's no loop that matches 'loop-index'"
youre comparing a list to a singular
{duel.request::%{_p}%::*} is true
also please disable reply pings
Sorry
How would I compare it to the giant list of things
are you tring to loop {duel.request::%{_p}%::*} then?
also that variable should use a uuid
I'm just trying to loop the list of the requests the player has
which would be that yes
I mean I could change it to be if {duel.request::%{_p}%::*} is set:
no
just loop this instead of looping the whole duel list
But how would this help me creating a individual thing for each and every request
you only want that player's requests though, right? not all requests from all players to all players?
Yeah
only that player's incoming requests
I do only want that players requests
Could I do something like
set {duel.request::%{_p}%::%loop-index%::slot} to {_slot}
nvm that wouldn't work
you have loop {duel.request::*}. you want loop {duel.request::%{_p}%::*}:
I have changed it to
loop {duel.request::%{_p}%::*}:
This is what I have now