It could be the wrong child Id
|
okay im trying to add an interface. but when i open the interface it crashes.
so when i try to open this interface it crashs but when i change the 33200 it will open but the background doesn't show. the other buttons do. how do i get it to stop crashing?Code:public static void addModerateWidget(TextDrawingArea[] tda) { RSInterface widget = addInterface(33200); addSprite(33201, 0, "Interfaces/Moderate/IMAGE"); addHoverButton(33202, "Interfaces/Moderate/IMAGE", 1, 21, 21, "Close", -1, 33203, 3); addHoveredButton(33203, "Interfaces/Moderate/IMAGE", 2, 21, 21, 33204); addInputField(33205, 120, 0xFF981F, "Reason", 144, 20, false, true, "[A-Za-z0-9 ,']"); addText(33206, "'Fourteen Chars'", tda, 2, 0xFF981F, true, true); addHoverButton(33207, "Interfaces/Moderate/IMAGE", 5, 90, 25, "Close", -1, 33208, 1); addHoveredButton(33208, "Interfaces/Moderate/IMAGE", 6, 90, 25, 33209); addText(33210, "Execute", tda, 2, 0xFF981F, true, true); addInputField(33211, 120, 0xFF981F, "Duration", 144, 20, false, true, "[0-9]"); setChildren(10, widget); setBounds(33201, 180, 46, 0, widget); setBounds(33202, 313, 53, 1, widget); setBounds(33203, 313, 53, 2, widget); setBounds(33205, 185, 232, 3, widget); setBounds(33206, 250, 55, 4, widget); setBounds(33207, 215, 254, 5, widget); setBounds(33208, 215, 254, 6, widget); setBounds(33210, 258, 259, 7, widget); setBounds(33211, 185, 212, 8, widget); setBounds(33214, 185, 77, 9, widget); RSInterface scroll = addInterface(33214); scroll.width = 128; scroll.height = 135; scroll.scrollMax = 220; setChildren(20, scroll); for (int i = 0; i < 20; i += 2) { addClickableSprites(33215 + i, "Select", "Interfaces/Moderate/IMAGE", 3, 4); addText(33215 + i + 1, "Empty", tda, 0, 0xFF981F, false, true); setBounds(33215 + i, 0, i / 2 * 22, i, scroll); setBounds(33215 + i + 1, 4, 6 + (i / 2 * 22), i + 1, scroll); } }
It could be the wrong child Id
it doesnt crash when loading. it crashes when trying to open that interface
https://gyazo.com/58de2380fda309f6df30c75c7dd861e8
this is the error i get. but im not sure whats causing it.
Code:java.lang.NullPointerException at com.client.Client.method60(Client.java:4171) at com.client.Client.parsePacket(Client.java:16356) at com.client.Client.mainGameProcessor(Client.java:42 29) at com.client.Client.processGameLoop(Client.java:3423 ) at com.client.RSApplet.run(RSApplet.java:283) at com.client.Client.run(Client.java:6593) at java.lang.Thread.run(Thread.java:748) Error: T2 - 97,126,-1 - 2,3086,3498 - 88,122,
Make the interface simple and then start adding till you get the interface you want
Make the interface simple and then start adding till you get the interface you wantpublic static void addModerateWidget(TextDrawingArea[] tda) {
RSInterface widget = addInterface(33200);
}
public static void addModerateWidget(TextDrawingArea[] tda) {
RSInterface widget = addInterface(33200);
System.out.println("Loading?");
}
Not really helpful. Should add a command to print out the nulled interface ids
setChildren(20, scroll);
for (int i = 0; i < 20; i += 2) {
This part there might be the issue. outprint the total value of "i" to see
Edit: If you still can't get it to work dm me i will take a look for you at it and help you to solve it.
addModerateWidget(TextDrawingArea); need to add this
i figured it out actually. for some reason it did not like the interface id 33200. i ended up changing and adding one line of code at a time.
« Previous Thread | Next Thread » |
Thread Information |
Users Browsing this ThreadThere are currently 1 users browsing this thread. (0 members and 1 guests) |