Hi i have different file i use fonline:Reloaded SDK
I found this line
When i change the uint number to 1 SDK crash i dont know where i go wrong :/
First:
If you modify something in the scripts, (filename.fos) you should compile it with:
compile.bat "filename.fos" - if it is a server scripts
compile_client.bat "filename.fos" - if it is a client script
In your case compile.bat, (just go to "\server\scripts\" folder, and run there form command line) what this does is it will show possible error, it's faster and you will see the line number where things went wrong easier.
If everything compiles that you have changed or created, then run the server.
Second:
What you did there, was wrong, because you tried to change the prototype of a function. The "uint number" is an argument, variable, that will have a value that is determined when the function is called.
Function prototype/signature/whatever you call it: ITown@ SetInfluenceMemberRequirement(uint number)
Function call: town = SetInfluenceMemeberRequirement(1);
So you have to browse the source file, and change the numeric value from let's say 5, to 1.
I also advise you to learn a bit of C/C++/C#/Java programming (any of those), just do some "Hello world" examples, maybe make a program that calculates the area of a square or a triangle, then read the Basic FOnline tutorials on this site.
To not to let you totally down, here is what you needed to do:
- Search for SetTotalMemberRequirement in the scripts. (All of the files, you can use TotalCommander, or if you set up some IDE to program in, then using that)
- Find the "void InitTowns()" function in the file named: "towns.fos", which has a function call to "ADD_TOWN(Modoc, "Modoc", SetMapID(map_modoc.Id)" which has part that looks like this:
#ifndef __DEBUG__
.SetNearbyMemberRequirement(3)
.SetTotalMemberRequirement(3)
.SetInfluenceMemberRequirement(99)
The #ifndef __DEBUG__ means that this executes if you are not in debug mode, which is used for testing. In your case you need to change these values accordingly, maybe to 1?
Other options are to run in test mode, by inserting a line on top of this file: "#define __DEBUG__", and then you do not have to change values, because people tested it with 1 players, see the source:
#ifdef __DEBUG__
.SetNearbyMemberRequirement(1)
.SetTotalMemberRequirement(1)
.SetInfluenceMemberRequirement(1)
#endif
Gl.
Edit: You can find a tutorial how to setup CodeBlocks project over the SDK
here.