PDA

View Full Version : Anit any 508 coder good enough!!!!! (actionbuttons)



red merlin
July 15th, 2010, 07:34
:cool: hiya well i just doin the thing so when u click something on this interface is gives u items etc... well i gt this prob

Only the registered members can see the link.

also this is wat the codes are



case 248:// Void Interface
if(buttonId == 4)
{
if(p.VoidPts >= 250)
{
p.VoidPts -= 250;
Engine.playerItems.addItem(p, 8839, 1);
Engine.playerItems.addItem(p, 8840, 1);
Engine.playerItems.addItem(p, 8841, 1);
Engine.playerItems.addItem(p, 8842, 1);
}
else
{
p.frames.sendMessage(p, "You need 250 Points for this Void Set");
}
if(buttonId == 5)
{
if(p.VoidPts >= 150)
{
p.VoidPts -= 150;
Engine.playerItems.addItem(p, 11663, 1);
Engine.playerItems.addItem(p, 11665, 1);
Engine.playerItems.addItem(p, 11664, 1);
}
else
{
p.frames.sendMessage(p, "You need 150 Points for this Void Helm Set.");
}
if(buttonId == 6)
{
if(p.VoidPts >= 100)
{
p.VoidPts -= 100;
p.spendingExperience += 25000;
}
else
{
p.frames.sendMessage(p, "You need 100 Points for this Spending XP(25K).");
}
if(buttonId == 7)
{
if(p.VoidPts >= 500)
{
p.VoidPts -= 500;
p.spendingExperience += 250000;
}
else
{
p.frames.sendMessage(p, "You need 500 Points for this Spending XP(250K).");
}
break;
};
break;
};



Rep++ to any who is so super that they can help!!!! ;)

Red Merlin

Faab234
July 15th, 2010, 08:56
Is your "Void Interface" case in a Switch?

Aphelion5
July 15th, 2010, 11:16
To add to Faab234's comment, usually errors like those have NOTHING to do with what's inside the case, just where the case is placed.

[EDIT]
Only the registered members can see the link.!
Look familiar?

Canownueasy`
July 15th, 2010, 14:14
IDK wut you were doing but here

case 248:// Void Interface
if(buttonId == 4)
{
if(p.VoidPts >= 250)
{
p.VoidPts -= 250;
Engine.playerItems.addItem(p, 8839, 1);
Engine.playerItems.addItem(p, 8840, 1);
Engine.playerItems.addItem(p, 8841, 1);
Engine.playerItems.addItem(p, 8842, 1);
}
else
{
p.frames.sendMessage(p, "You need 250 Points for this Void Set");
}
if(buttonId == 5)
{
if(p.VoidPts >= 150)
{
p.VoidPts -= 150;
Engine.playerItems.addItem(p, 11663, 1);
Engine.playerItems.addItem(p, 11665, 1);
Engine.playerItems.addItem(p, 11664, 1);
}
else
{
p.frames.sendMessage(p, "You need 150 Points for this Void Helm Set.");
}
if(buttonId == 6)
{
if(p.VoidPts >= 100)
{
p.VoidPts -= 100;
p.spendingExperience += 25000;
}
else
{
p.frames.sendMessage(p, "You need 100 Points for this Spending XP(25K).");
}
if(buttonId == 7)
{
if(p.VoidPts >= 500)
{
p.VoidPts -= 500;
p.spendingExperience += 250000;
}
else
{
p.frames.sendMessage(p, "You need 500 Points for this Spending XP(250K).");
}
}
}
break;