Post: how to put a new code in a patch
02-02-2012, 05:59 PM #1
(adsbygoogle = window.adsbygoogle || []).push({}); hello has all I ask my first question about this site even if I am registered for a long time ... my question: I would like to know how to add code on a patch when I had my way I add an error.
my way: I copy the code in one section (can be bad: /) and after I add the option in the menu
but I have an error so if you could explain to me Here it would be cool ..
one last question: certain patch does not open with ff viewer how?
Thank you for your help. (Sorry if I made ​​mistakes or else I'm not English thank you)

ps:sorry if already been posted

Bye

i_LoVe-My_DreaM-
02-13-2012, 01:16 AM #2
Mate find a patch and look in it and see how they have done it :jim:
02-15-2012, 03:27 PM #3
Kearney158
Bounty hunter
Depends what menu base you have but basically there's two steps;

1) Add an option in the menu for your new mod and link it to your function
2) put the code (function) anywhere in the GSC

Best way to see how its done is follow TaDaMoDz advice and just go through the patch and see how they did it....thats how most people learn to code, just by going through patches and seeing how they work :P
02-18-2012, 05:36 PM #4
hello guys ,yes I tried I stuck a function (example binds) after jai in the code menu and I stuck example:
self.option [8] [11] = "Best Binds / unlock";
self.function [8] [11] = :: nfoBinds;
after I save but when I run a party loading the map stops and I have a script error so I do not understand: s anyway thank you for having responded
02-18-2012, 07:47 PM #5
Kearney158
Bounty hunter
Originally posted by lioka77 View Post
hello guys ,yes I tried I stuck a function (example binds) after jai in the code menu and I stuck example:
self.option [8] [11] = "Best Binds / unlock";
self.function [8] [11] = :: nfoBinds;
after I save but when I run a party loading the map stops and I have a script error so I do not understand: s anyway thank you for having responded


1)Does the patch definitely work before you edit it?

2)When you added;
    self.option [8] [11] = "Best Binds / unlock";
self.function [8] [11] = ::nfoBinds;


to the patch did you you make sure that the code before it was;

    self.option [8] [[B]10[/B]] = "Blahblahblah";
self.function [8] [[B]10[/B]] = :: blah;


i.e. did you increase the number?

3)Did you add the function, nfobinds() to the patch and is it in the same GSC file? Also, make sure there isn't another function in any of the GSC file's with the same name.

4) what script error did it give you? Was it bad bad syntax?
02-18-2012, 10:13 PM #6
thank you again for your answer and yes i change the number :s I put a following so I change the number depending on where I put him.and for the error yes its bad syntax .
thank you

---------- Post added at 11:13 PM ---------- Previous post was at 10:52 PM ----------

sorry its not syntax my error is :SERVER SCRIPT COMPILE ERROR UNKNOW FUNCTION(SEE CONSOLE FOR DETAIL)


thank you
02-18-2012, 10:36 PM #7
Kearney158
Bounty hunter
Originally posted by lioka77 View Post
thank you again for your answer and yes i change the number :s I put a following so I change the number depending on where I put him.and for the error yes its bad syntax .
thank you

---------- Post added at 11:13 PM ---------- Previous post was at 10:52 PM ----------

sorry its not syntax my error is :SERVER SCRIPT COMPILE ERROR UNKNOW FUNCTION(SEE CONSOLE FOR DETAIL)


thank you


Great that's very easy to fix...basically unknown function means that either the function doesn't exist or it cannot find it. Check when you added the function did you type it right. Also did you put the function() in the same GSC .
02-19-2012, 01:34 AM #8
i use the patch of xraw not the last version . and i dont understand when you say "Also did you put the function() in the same GSC" .function () for you is the added option in the menu or CODE is the function?

thank you
02-20-2012, 04:54 PM #9
Kearney158
Bounty hunter
Originally posted by lioka77 View Post
i use the patch of xraw not the last version . and i dont understand when you say "Also did you put the function() in the same GSC" .function () for you is the added option in the menu or CODE is the function?

thank you


emm both...The function(option) in the menu is telling the game to run that function if the gamer selects that mod
i.e if you choose best binds/unlock it will look through the GSC for the nfoBinds() function(code) and run it.
When you write the function in the menu, think of it as a link to the code.

so anywhere in the GSC file you put;

nfoBinds()
{
blahblah;
blahblahblah; /////////////(code goes here)
}
Last edited by Kearney158 ; 02-20-2012 at 04:57 PM.
02-20-2012, 05:02 PM #10
IVI40A3Fusionz
Former Gaming Squad Member
Originally posted by Kearney158 View Post
emm both...The function(option) in the menu is telling the game to run that function if the gamer selects that mod
i.e if you choose best binds/unlock it will look through the GSC for the nfoBinds() function(code) and run it.
When you write the function in the menu, think of it as a link to the code.

so anywhere in the GSC file you put;

nfoBinds()
{
blahblah;
blahblahblah; /////////////(code goes here)
}


    
nfoBinds()
{
blahblah;
blahblahblah; /////////////(code goes here)
}


I spy a syntax error :carling:, i'm only ****ing with you ^^ but if you give an example give one without an error Winky Winky.

Copyright © 2024, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo