strncpy question
I am working on a small side project for me to add npc's just by being in the world.
I am saving them to the database but now I want to remove the 000's can somebody over look this code tell me what is wrong and someway to fix it. Code:
void Database::SaveSpawn(const char* s1, int8 s2, int16 s3, int8 s4, sint32 s5, int8 s6, int8 s7, int8 s8, float s9, int8 s10) It is removing the three 000's but replacing with this other crap any tips? [code] hot |
The 000's MUST be there. Well it should be 00 (Hogie changed it in the next release). Never remove them. Otherwise, things won't work properly. (Like horses etc.)
|
Yea,I understand that but when you put them in the NPC_TYPES table you do not need 000's the 00's are added by the emulator and client or you would need to have a shit load of the same spawn records there for defeting the pourpse of a database.
I dont want to remove them from the game just the record i am putting into the database from walking around the zone! ontop of that the question was is there a way to fix my problem its in no way part of the release that hoggie and all the awsome dev's do. Just a simple function I want to use. |
Then just do snbuff[snl] = 0;
|
Spank You!
I kept trying to do it char snbuffer[snl]; and it wasnt working now i know why :) :) *I learn something new everyday* :) |
All times are GMT -4. The time now is 10:24 PM. |
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.