Jump to content

What is wrong with this script?


iTz Rossss X

Recommended Posts

Hi,

 

I've been making a script for a forge that allows you to make your own staff, here it is:

 

scn aaaFrozenFurnace01SCRIPT

 

int button

int buttonPressed

 

Begin OnActivate

if IsActionRef player == 1

messageBox "Would you like to create a diamond staff? It requires 50 pieces of flawless diamond.", "Yes.", "No.";

set buttonPressed to 1

endif

end

 

begin Gamemode

if buttonPressed == 1

set button to getbuttonpressed

 

if button > -1

if button == 0

; if player.getitemcount Gem6DiamondFlawless == 50;

player.removeitem Gem6DiamondFlawless 50

player.additem aaaWEAPDiamondStaff01 1

else

message "You don't have enough flawless diamonds. (You need 50.)"

return

elseif button == 1

; return

endif

endif

endif

end

 

 

If I don't have the 50 diamonds requirements it still gives me the diamond staff. What can I do to fix this?

 

Thanks in advance.

 

 

~~~iTz

Link to comment
Share on other sites

Take out the ; (semicolon) at the beginning of this line:

 

; if player.getitemcount Gem6DiamondFlawless == 50;

 

 

 

Semi colon makes the line a comment, which is ignored by the script.

Link to comment
Share on other sites

Added to that, I would make >= 50 of that, as without it would force the player to have 50 diamonds even though the player might have more of them.
Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...