Properly transfering code.
#1

Hello. I would appriciate, if someone would explain me how to properly transfer code.
I want to get carrots - United Gaming RP's point and turf system to my own gamemode. Our scripts are fairly similar, but after transfering turfs, i got errors that some of the code wasnt defined while in u-rp it was. Even defining them didnt help.
If someone has time, could you copy the exact code places which i need to transfer? I know it sounds silly asking someone else to do the work for you, but i just dont know any other way. Im not so good at reading tutorials..
Reply
#2

Were the systems designed in their own include or are they slapped into the gamemode?
Reply
#3

Quote:
Originally Posted by [uL]Pottus
Посмотреть сообщение
Were the systems designed in their own include or are they slapped into the gamemode?
I guess slapped.
Reply
#4

That could be a big part of the problem, it's difficult use systems that do not have a modular design so what ends up happening is parts of the system get intermixed into various callbacks which is difficult to extract. It's a poor way to script like that y_hooks can work wonders for organizing your code once you take a modular approach there will be less searching for code and your code won't mixed with unrelated system.
Reply
#5

Quote:
Originally Posted by [uL]Pottus
Посмотреть сообщение
That could be a big part of the problem, it's difficult use systems that do not have a modular design so what ends up happening is parts of the system get intermixed into various callbacks which is difficult to extract. It's a poor way to script like that y_hooks can work wonders for organizing your code once you take a modular approach there will be less searching for code and your code won't mixed with unrelated system.
But its still possible... I dont know anything about y_hooks so ill better stay away from unfamiliar things. Mind teaching me how to transfer the code as it is - without y_hooks?
Reply
#6

You need to find where all the parts of it are used for instance some might be used in OnPlayerKeyStateChange(), OnPlayerCommandText() etc it's a pain in the ass to do.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)