3 Attachment(s)
Re: [Tutorial to writeGlobalField function]How to add new field and edit existing one
When I try to compile the codes (f9) I get an error. This one: 19 C:\Program Files (x86)\PPT-Server\writeField\writeField.cpp expected constructor, destructor, or type conversion before '(' token
Attachment 111103Attachment 111104Attachment 111105
Mabye I should also note that when I teleport to a field more than Ice mine, I just teleport to grey space. *I guess this is because I didn't add the OLD_files yet cause i don't know how exactly) also, I used the normal writefield function, not the global one. I will also try what will happen if i use the global one. I think it doesnt make much difference.
Re: [Tutorial to writeGlobalField function]How to add new field and edit existing one
Open project in writeClientField/writeServerField folder and than compile.
You should download newer version because v1 don't have old_fields.
Re: [Tutorial to writeGlobalField function]How to add new field and edit existing one
this one got old_versions I believe, it goes up to field 62 ;). Can't get the old_files to work though. They work perfectly on client, but my server crashes :(. I don't need to do anything to the gameserver/field folder?
Re: [Tutorial to writeGlobalField function]How to add new field and edit existing one
Try to keep same questions in one thread. I already answered here.
Re: [Tutorial to writeGlobalField function]How to add new field and edit existing one
I'm sorry to ask this many questions, but I just can't seem to make it work.
When i open writeserverfield, which one do i need to compile writeServerField.cpp or .h? .cpp gives an error:
C:\Program Files (x86)\PPT-Server\writeField\writeServerField\/..\writeField.cpp:1012: error: invalid conversion from `BYTE*' to `char*'
C:\Program Files (x86)\PPT-Server\writeField\writeServerField\/..\writeField.cpp:1012: error: initializing argument 1 of `int environment(char*, int, int, int, int, int, int, int, int)'
Uitvoering voltooid (translation: Run finished)
Or is this correct and do i just need to ignore the errors?
Re: [Tutorial to writeGlobalField function]How to add new field and edit existing one
What version you are using? Just get newest version and use Code::Blocks to compile project.
Re: [Tutorial to writeGlobalField function]How to add new field and edit existing one
ooh i used dev++, I retry with blocks this time :)
Re: [Tutorial to writeGlobalField function]How to add new field and edit existing one
Quote:
Originally Posted by
jeroenen9
which one do i need to compile writeServerField.cpp or .h?
Obviously, neither of those. That would be kinda silly, and is bound to fail due to a lack of various dependencies.
You would never "compile" from a header file. (.h) Since that is only "glue" to inform where dependencies may be found. However, the project is compiled as a whole, and all .cpp & .h files must be compiled as one.
This is where projects / make files / compilation scripts come in. You should always compile those... not individual source files.
Only the simplest source requires no more than one file, and possibly one local header.
Re: [Tutorial to writeGlobalField function]How to add new field and edit existing one
Okay so no compiling .h or .cpp. Which one do I need to compile?
T
Quote:
This is where projects / make files / compilation scripts come in. You should always compile those... not individual source files.
Which make files are you talking about? about the CBP. Or what do you exactly mean?
Re: [Tutorial to writeGlobalField function]How to add new field and edit existing one
When I last compiled it was a .dev file for Bloodshed Dev C++... and I created equivalents for various other IDEs based on that... but since Vormav has moved to Code::Blocks for his development... I guess he should be providing a .cbp now?
Other common source distribution solutions:-
Make files are usually .mak or just makefile with no extension at all. But it all depends on the build engine you are using to manage your projects. A build script could easily be a .bat or .cmd for Windows, but is more usually a bash script .sh file. For Windows, you could write Windows Script Host (.WSH) files or VBScript(.VBS)... PowerShell script or on a Mac AppleScript, but I've never seen it done. Or you could write explicit manual instructions for all the little compilation and linking steps to be done manually. I've seen that done, and it's quite nice in that it becomes pretty obvious how anyone should create a new project for their chosen IDE, or create a make file for their build engine or script engine of choice... but it means a lot of work re-documenting every time you add another file or target to your project. :(: So it's less popular with the lead developer / project co-ordinator.
Why so complex?:-
Usually you break source code down into smaller files so you don't have to read a code document the length of War and Peace, scanning backwards and forwards to see how different bits of code interact with one another. But a default compile, passing a single source file, will try to create an executable from that file alone. It should compile okay, maybe with a few warnings, and completely fail to link. Because it expects to be linked to all the routines in the other files.
So what you need to do is compile all the modules, one at a time, without trying to link them into an executable file. Then you link all the object files (the compiled, but not yet linked source) together with an executable header which your OS understands to create the final application.
Re: [Tutorial to writeGlobalField function]How to add new field and edit existing one
Hello my IDE mising library C++ not thought to install please upload
Re: [Tutorial to writeGlobalField function]How to add new field and edit existing one
Quote:
Originally Posted by
Destmagic
Hello my IDE mising library C++ not thought to install please upload
I do not comprehend.
Re: [Tutorial to writeGlobalField function]How to add new field and edit existing one
My code blocks is not compiling the dll with this error. error: expected constructor, destructor, or type conversion before '(' token
Re: [Tutorial to writeGlobalField function]How to add new field and edit existing one
I need more info than that... there is lot of '(' in my code. Compiler will give you exact line and name your error.
"Format C" or C::B reinstall can fix your problem.
Re: [Tutorial to writeGlobalField function]How to add new field and edit existing one
i think he does't have C++ library pack.