Jump to content

Alina

Inactive Member
  • Posts

    174
  • Joined

  • Last visited

  • Days Won

    13
  • Feedback

    0%

Everything posted by Alina

  1. I talked at third person to give an example from the perspective of a normal user and.. well, nevermind. then why not at first use short int? If they want to raise the value above 32767 (which in normal cases doesn't happen) they'd also just change the datatype. Generally using int takes more memory and isn't the way you'd write your programs. If you don't need more, then just don't waste your resources on that
  2. whew then vanilla must've made a little bit of a mess Let's play a little scenario. Here's what you'd do to have a bug in your CONFIG: MAX_HT: 32767 MAX_STATUS: 100 In this case, when the gamefile reads your max-status, it'll do the following statement: if(gPlayerMaxHT==32767) gPlayerMaxHT = gPlayerMaxStatus; So what happened to our max_ht of 32767? Yep, it's now 100. Though I guess no one will use 32767 I think it still counts as a bug. Also I don't know why the variable isn't short int.. since.. well.. 32767 is the max length of short int. So it'd make more sense to chose short int
  3. What revenge? Oo Thanks for your kind words
  4. stdint.h is missing. Normally it's within the Extern folder. What branch did you use? Novaline, mainline, etc... ?
  5. it seems like STEAG is your variable storing the flag. Therefore the solution is simple fprintf(stderr, "EMOTION_WITHOUT_MASK: %d", STEAG); Also you can do: fprintf(stderr, "EMOTION_WITHOUT_MASK: %d", (true == emotion_without_mask) ? 1 : 0); Both should work
  6. The query is correct. Can you show us what you're doing with "kills" after the query executed? Also make sure your quest can use mysql queries via mysql_query() function
  7. return "returns" a value. Simple as that In short: You can use this to create your own functions that return a value. Simple example: int add(int a1, int a2) { return a1 + a2; } int main() { int result = add(1, 1); printf("The result is %d", result); return 0; //in main() this tells the system that the program succeeded return 1; //in main() this tells the system that the program failed } Note that return ends the function immediately. That means, that in our example, the return 1; is completely nonsense and will not be reached since the main() function already returned 0. In int main() it's important to return 0 if the program succeeds (compilers will add that tho if you miss it) and otherweise 1 for program errors. Have fun
  8. c++14 doesn't work for me, it's return me an error about the non-existence of the command. :x Which version of gcc/clang are you using? You need gcc 4.8 or higher! You can either use -std=c++14 or -std=c++1y If you're full brave and man enough you can try -std=c++17 or -std==c++1z but note that trigraphs won't work in this version since they're deprecated and now removed. So empire language won't work anymore unless you convert the trigraphs before
  9. You either need to change it in src (there are a few tutorials around for that) or use a db cache that's capable of doing so. These files can do it: These sources can do it: guess so but I don't really know) Just went on searching on the first page, if there are any other files who can do that, feel free to use them With this guide you can build your own db cache with sql support:
  10. AntiCpXSrv.h is missing. You need that It's normally in any source, don't know why you don't have it. You can try and using the AntiCpXSrv.h from other sources, maybe that'll work
  11. You need a db cache that's capable of loading the item and mob protos from sql instead of txt. Either build your own or use one that's already able to do it
  12. Ouh, that's an easy one, leave it to me! unique_ptr is a function that's introduced with c++11. I guess you're not compiling with c++11 support then. Either replace all unique_ptr with auto_ptr (which is not recommended since auto_ptr is deprecated) or add -std=c++11 or -std=c++14 if you want c++14. Also make sure your compiler does support these instructions (c++11 support is poor in old gcc versions) and everything should work with unique_ptr
  13. That's just a client error. Did you raise the maximum line length? Many people are doing this to prevent say() functions to get cut off and resumed on next line. Unfortunately, the position for items is approx length/2 so it's in the middle of the quest window. Since you raised it, it's shifted to right
  14. syserr tells you: SYSERR: Apr 5 19:34:24.464838 :: ReadSpecialDropItemFile: ReadSpecialDropItemFile : there is no item 110010 : node Э؂ȑࠫȥ࠸ܮ_Oڝ-ȭ؁ So that's why the server can't bood. The item 110010 is nonexistent. Delete it or add it to item_proto
  15. Read that again Alina! MIN(1800, 0) is most certainly 0. Max time for caching is 1800, though. But but but +1 haha Sorry, I missed something there. Thought that MIN would work like MINMAX, but that'd require for YMIR to write meaningful code... Actually MINMAX does define a minimum and maximum value, I thought with MIN it was the same but I miserably failed. Thanks for correcting me It also doesn't make sense for them to limit the max cache duration but not the minimum one. They're strange. Really. :/ Still. Setting to 1 or 0 is plain suicide. Good luck with that
  16. Please send me screenshots or code quotes from the changes you made. Most likely you missed something accidentally
  17. That's why I said the results are cached either way. So it doesn't matter at all I chose mysql cloumn because there may be other implementing ways. Maybe someone wants to add commands to this, the easiest way is with a player table holding the variable. That's why^^ Or maybe it was just more fun to code it that way. Chose what you prefer
  18. PLAYER_CACHE_FLUSH_SECONDS = 0 Well. No. It does nearly to nothing to be honest Main.cpp stores the Config entry into the variable g_iPlayerCacheFlushSeconds. This variable is only called one more time then (the other two calls are commented). And the snippet looks like this: m_expireTime = MIN(1800, g_iPlayerCacheFlushSeconds); Therefore, the min time for caching is 1800 no matter what you type in Also, for trying that, I hereby declare you guilty of trying to break your own server! Now go to a dark corner and cry full of shame! Well.. Maybe that's exaggerated a bit. But you still shouldn't do something like this. Never. Ever.
  19. What do you mean with throws? you mean you get teleported back? If that's the case, then you'd check your locale/data/pc3 files, they might be not okay :/
  20. The results are cached either way and something that needs to be accessed more than just once should be hold in RAM so the server can access it without any delays. That's why I chose to add it to the player points table Note that everytime you mount/unmount the vnum of your horse will be loaded again (as long as you're using a horse of course...^^)
  21. Whew I have a fan! Thanks for the nice reply!
  22. Weeeeeeeeeeeeeeeeeell, the best way to do this is using the plain functions. You'd know how the cache works. The gamefile holds the player values in memory, so it allocates RAM for every player. Also it sends the data stored to the dbcache and there's the cache you're looking for. You can manually push the values to the dbcache by calling SaveReal() from the CHARACTER-class (the normal Save() has a delay) But there's no need to edit the cache itself! You only have to edit the values stored in the gamefile. The next update will push it to the dbcache where it's cached and then written to the database later. So. Yeah, you found it What you might be looking for is Show(long lMapIndex, long x, long y, long z = LONG_MAX, bool bShowSpawnMotion = false) or Goto(long x, long y) in CHARACTER-class. These functions will overwrite the position stored inside the game instance. The next Save cycle will push it to the dbcache. If you're getting the error and relocating your character, you can straight log in again and it will work, no need to terminate the server or reload anything
  23. Can you post the error you're getting when the player is at an invalid coordinate? I could provide a small solution, it's not that big. When the error occurs, you can just Set the player coordinates to a specific place and map index. Also. You're working on a map, don't you? Why not exten the server_attr so you won't get kicked off? You can extend it, walk around and do your job and then revert to the old server_attr after you're done
  24. "The simplest explanation is probably the right explanation." - Occam's razor You can just use a source-based solution. If you run into that error, you can reset the players coordinates or something. That should do the trick without the need to flush caches etc...
  25. I cleared it^^ But many people are using newer versions of gcc/clang which won't work like this. Since cc is only replaced in /etc/make.conf it will take part in compiling ports in the portstree or building the kernel, but it won't take effect in compiling the source at least not when you're doing something like this: CC = gcc49 That's the point where ccache won't be a part of the compilation. Also, feel free to use cc -v This prints out the compiler version. If you replace it on /etc/make.conf, you'll notice that cc -v still prints out the system's compiler no matter if you're using a more actual version of gcc/clang or whatever. So the effects from make.conf are applied when building ports or kernel, but not when compiling your custom sources. Adding ccache to your Makefile is therefore needed to make it work. Maybe it'll work when using CC = cc but I don't know and I guess it won't but feel free to correct me if I'm wrong
×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.