Jump to content
  • 0

gacha npc error


Eerks2002

Question


  • Group:  Members
  • Topic Count:  1
  • Topics Per Day:  0.02
  • Content Count:  2
  • Reputation:   0
  • Joined:  02/24/25
  • Last Seen:  

Hello guys, im new here,and this my first post. Im sorry for any inconvenience. Sorry for my bad english.

 

This is my gacha zeny npc multiple rolls option.
everything else is fine,but the problem is whenever i choose next roll,but my zeny is not enough. the box doesnt close. it will stuck,and my SSH console shows error. but I can not solve it due to my lack of knowledge in C++

can someone help me?

set .@nextChoice, select("Roll Again :Exit");
        if (.@nextChoice == 2) break;
        set .@rolls, (.@choice == 1 ? 1 : (.@choice == 2 ? 5 : 10));
        if (.@choice == 3) set .@rolls, .@rolls + 1; // Bonus roll for 10 rolls option
        set Zeny, Zeny - (250000 * (.@rolls - (.@choice == 3 ? 1 : 0))); // Deduct correct Zeny amount
    }
    mes "Thanks for playing! Come back anytime.";
    close;

OnInit:
    delwaitingroom;
    waitingroom "Gacha Zeny $$", 0;
    end;
}
Quote

[Error]: script_set_reg: failed to set param 'Zeny' to -21652.

 

Edited by Eerks2002
Link to comment
Share on other sites

1 answer to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  5
  • Topics Per Day:  0.00
  • Content Count:  93
  • Reputation:   33
  • Joined:  11/08/15
  • Last Seen:  

Maybe... because you don't have zeny? can you post your full script?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...