|
|
I'm trying to add Gambler NPC but I keep getting this error?
Code:src\com\rs\game\player\dialogues\Gambler.java:21: error: ')' expected ("How much do you wish to gamble?", "10,000gp", "100,000gp", "1,000,000g p", "10,000,000gp", "Actually, not right now."); ^
try that.Code:package com.rs.game.player.dialogues; import com.rs.cache.loaders.NPCDefinitions; import com.rs.game.player.Gamble; public class Gambler extends Dialogue { private int npcId; @Override public void start() { sendEntityDialogue(SEND_2_TEXT_CHAT, new String[] { NPCDefinitions.getNPCDefinitions(npcId).name, "Hello, Wanna take a chance to double your GP?"}, IS_NPC, npcId, 2998); } @Override public void run(int interfaceId, int componentId) { if (stage == -1) { sendOptionsDialogue ("How much do you wish to gamble?", "10,000gp", "100,000gp", "1,000,000gp", "10,000,000gp", "Actually, not right now."); stage = 1; } else if (stage == 1) { if (componentId == 1) { new Gamble(player, 10000); end(); } else if (componentId == 2) { new Gamble(player, 100000); end(); } else if (componentId == 3) { new Gamble(player, 1000000); end(); } else if (componentId == 4) { new Gamble(player, 10000000); end(); } else if (componentId == 5) { player.sm("Come back if you want to try!"); end(); } } } @Override public void finish() { } }
Now I get this. :/Code:src\com\rs\game\player\dialogues\Gambler.java:20: error: cannot find symbol sendOptionsDialogue ^ symbol: method sendOptionsDialogue(String,String,String,String,String,String ) location: class Gambler Note: src\com\rs\game\player\Inventory.java uses unchecked or unsafe operations. Note: Recompile with -Xlint:unchecked for details. 1 error compiled Player folder

there is 5 options though
Code:package net.zyphyr.server.entity.character.dialogues; import net.zyphyr.cache.loaders.NPCDefinitions; public class Gambler extends Dialogue { private int npcId; @Override public void start() { sendEntityDialogue(SEND_2_TEXT_CHAT, new String[] { NPCDefinitions.getNPCDefinitions(npcId).name, "Hello, Wanna take a chance to double your GP?"}, IS_NPC, npcId, 2998); } @Override public void run(int interfaceId, int componentId) { if (stage == -1) { sendDialogue(SEND_5_OPTIONS("How much do you wish to gamble?", "10,000gp", "100,000gp", "1,000,000gp", "10,000,000gp", "Actually, not right now.")); stage = 1; } else if (stage == 1) { if (componentId == 1) { //new Gamble(player, 10000); end(); } else if (componentId == 2) { // new Gamble(player, 100000); end(); } else if (componentId == 3) { //new Gamble(player, 1000000); end(); } else if (componentId == 4) { // new Gamble(player, 10000000); end(); } else if (componentId == 5) { player.sm("Come back if you want to try!"); end(); } } } private String SEND_5_OPTIONS(String string, String string2, String string3, String string4, String string5, String string6) { // TODO Auto-generated method stub return null; } @Override public void finish() { } }
sigh.. still no luck. do you have TV or something so you can look at my files? here's what that gave me.
Code:src\com\rs\game\player\dialogues\Gambler.java:22: error: method sendDialogue in class Dialogue cannot be applied to given types; sendDialogue(SEND_5_OPTIONS("How much do you wish to gamble?", "10,000gp ", "100,000gp", "1,000,000gp", "10,000,000gp", "Actually, not right now.")); ^ required: short,String[] found: String reason: actual argument String cannot be converted to short by method invocati on conversion Note: src\com\rs\game\player\Inventory.java uses unchecked or unsafe operations. Note: Recompile with -Xlint:unchecked for details. 1 error compiled Player folder
PM me your skype name, i'm not getting any errors in eclipse. I have no idea why. It works for me :L
| « Help with tokkul currency [PI] | Rune-evo 718/742 Pk ranks reset? » |
| Thread Information |
Users Browsing this ThreadThere are currently 1 users browsing this thread. (0 members and 1 guests) |