mob
verb
Give_Ryo(M/mob,R as ryo)
if(usr.ryo >= 0)
view() << "[usr] Gives [M] [R]"
Trying to come up with a verb that will give a player x amount of ryo. don't want them to be able to give any amount though, they can only give up to what they have... looking for guidence not someone to do the work for me, im a beginner :
i've read that, but i guess i'm just having a little trouble with it. any suggestions or references?
|
I suggest looking through the extensive resource section. You aren't going to find a resource specifically telling you how to add and subtract variables, but if you poke around some of the resources you should learn a thing or two.
I pretty much told you exactly what you need to do, I just wrote it out. It is up to you to attempt to put it into code and see if it works. Programming is all about trial and error. You're going to screw up and get stuck, and you are going to have to keep trying until you figure it out. If you are really stuck (And I mean really stuck), then get a code example and bring it here so we can help you debug it. |
Don't give out code here please, you're defeating the purpose of having him learn on his own.
|
coding is a sole taught hobbie? if people didnt help people there wouldn't be any coders...i was asking for a structure with a explanation so i CAN learn it and not get this hunk of code^^. i checked the DM it wasn't clear to me so i asked for help in the Developer HELP section. im not asking for code to copy and paste, i want to learn how it works so i can do it by myself
|
Coding is indeed, for the most part, self-taught. If you don't go out and research things and learn on your own, you aren't really learning.
There's plenty of things you can find if you run a forum search of look through the resources, and we are happy to help you if you bring a snippet of code here that you can't figure out. Don't think that I'm attacking you or singling you out - this is how most, if not all of the experienced people here on the forums learned. It is a tried and true method. |
This requires simple variables as arguments (Which you did wrong, it should be mob/m or m as mob), and then you simply need to subtract "ryo" from usr and add it to m's "ryo".
This is a very simple task that you should learn how to do by reading the DM Guide.