so i wanted to make a perworld auctio house but i struggling with the next page button. So i have this function for the main auction
so you see i tried to send some variable and the variable for the next page is always <none> ({auction-page::%{_g}%::%{auction-next::%{_g}%}%} this var and {new} this one) so any help i have been trying to fix it for 3 day and i have give up that why i ask if someone know what the problem.
Code:
function auction(p: player,g: text):
set {auction-next::%{_g}%} to 1
set {_au} to a new chest inventory with 6 rows named "ᴀᴜᴄᴛɪᴏɴ ʜᴏᴜꜱᴇ"
set slot 45 of {_au} to a chest named "&cExpired item" with lore "&7Claim your expired item here"
set slot 46 of {_au} to a name tag named "&e&lSearch item" with lore "&aSearch for item id, name," and "&eor listener name"
set slot 49 of {_au} to a nether star named "&e&lRefresh page"
set slot 48 of {_au} to a barrier named "&fPreviouse page"
set slot 50 of {_au} to a arrow named "&fNext page"
set slot 51 of {_au} to a hopper named "&eSort" with lore "&7Current sort: Newest"
set slot 52 of {_au} to a book named "&eCategory" with lore "&eAll" and "&7Block" and "&7Weapon" and "&7Tools" and "&7Armor" and "&7Food" and "&7Other"
set slot 53 of {_au} to a ender chest named "&aYour Auction" with lore "&7See your listed auction"
send {auction-next::%{_g}%} to {_p}
send {_g} to {_p}
loop {auction-page::%{_g}%::*}:
delete {auction-page::%{_g}%::%loop-value%}
set {_an} to {auction-next::%{_g}%}
if {auction-list::%{_g}%::*} is set:
loop {auction-list::%{_g}%::*}:
set {item-item::%loop-value%} to skutil yaml value "auction-item.%loop-value%.item" from file "plugins/WorldAuction/group/%{_g}%/auction.yml"
set {item-prize::%loop-value%} to skutil yaml value "auction-item.%loop-value%.prize" from file "plugins/WorldAuction/group/%{_g}%/auction.yml"
set {item-category::%loop-value%} to skutil yaml value "auction-item.%loop-value%.category" from file "plugins/WorldAuction/group/%{_g}%/auction.yml"
set {item-seller::%loop-value%} to skutil yaml value "auction-item.%loop-value%.seller" from file "plugins/WorldAuction/group/%{_g}%/auction.yml"
set {auction-duration::%loop-value%} to skutil yaml value "auction-duration" from file {@config} parsed as timespan
set {_now} to now
set {_wait} to convert unix skutil yaml value "auction-item.%loop-value%.listed-date" from file "plugins/WorldAuction/group/%{_g}%/auction.yml" to date
set {_time} to difference between (convert unix (convert date {_wait} to unix) to date) and (convert unix (convert date {_now} to unix) to date)
remove {_time} from {auction-duration::%loop-value%}
if {cou} <= {cou::next}:
set slot {cou} of {_au} to {item-item::%loop-value%} with lore "&bID: &e%loop-value%" and "&bSeller: &e%{item-seller::%loop-value%}%" and "&bPrize: &e%{item-prize::%loop-value%}%" and "&bExpired On: &e%{auction-duration::%loop-value%}%" and "&bCategory: &e%{item-category::%loop-value%}%"
if {cou} > {cou::next}:
add "%loop-value%" to {new}
set {auction-page::%{_g}%::%{auction-next::%{_g}%}%} to
if {cou} = {cou::last}:
add 1 to {auction-next::%{_g}%}
add 44 to {cou::last}
add 1 to {cou}
send "%{cou::next}%, %{new}%, %{cou::last}%" to {_p}
send {_an} to {_p}
open {_au} to {_p}
so you see i tried to send some variable and the variable for the next page is always <none> ({auction-page::%{_g}%::%{auction-next::%{_g}%}%} this var and {new} this one) so any help i have been trying to fix it for 3 day and i have give up that why i ask if someone know what the problem.