We are about to switch to a new forum software. Until then we have removed the registration on this forum.
Null pointer exception?
JSONObject unDispersed;
Float undisperesdLTC = unDispersed.getJSONObject("data").getFloat("confirmed_balance");
void setup() {
size(480, 320);
frameRate(24);
}
void draw() {
pullUndispersed();
println(undisperesdLTC);
}
void pullUndispersed() {
//LTC pool
String walletAPI_URL = "https://"+"chain.so/api/v2/get_address_balance/LTC/LNhixHYiLQF2v6wKyoiizgJaQunuy6d8Jx/6";
unDispersed = loadJSONObject(walletAPI_URL);
}
Answers
the forum is killing links
you try to use unDispersed in line 3 but it's only set in line 18, you need a new order:
(changed http a bit to avoid that forum changes it)
here I receive in line 23 a http 403 - Forbidden status in response to a request from a client for a web page
maybe reread documentation of chain.so/api
https://en.wikipedia.org/wiki/HTTP_403