- Jan 20, 2018
- 1,501
- 108
- 63
- 21
Make the variable single (not a list variable)Ok so using the slash thing worked
The resource pack gets sent and I'm able to download it, but if I change add any textures to it the RP doesn't update automatically like it should when you specify a hash. So basically it's like I didn't specify any hash.Code:function sendRP(p: player): set {_link} to "myurl.zip" set {_hash} to {_link} hashed with MD5 {_p}.setResourcePack("%{_link}%/%{_hash}%")
Ok I'm gonna try this. And yes I wrote "mylink.zip" cause I didn't want to show the real one lol i'm not that stupid
[doublepost=1590575145][/doublepost]Code:function sendRP(p: player): set {_link} to "myurl.zip" set {_hash} to "32ff533b4917787841e096532b0606aadf270c5d" set {_convertedHash::*} to DatatypeConverter.parseHexBinary({_hash}) {_p}.setResourcePack({_link}, {_convertedHash::*})
I converted the string to a SHA-1 hash, tried doing this and it gave me this error (I also hid the url on the error).Code:[WARNING] [Skript] No matching method: CraftPlayer#setResourcePack called with (myurl.zip (String), [50, -1, 83, 59, 73, 23, 120, 120, 65, -32, -106, 83, 43, 6, 6, -86, -33, 39, 12, 93] (Object[]))
EDIT: I didn't notice when you said "you need to hash the file, not the string". I hashed the file, replaced the hash in the code with this one e0d2f0373c1befd029b67a56b976db86705e2b45 and it still gives me the last error.