logo logo

 Back to main page

The NWNX Community Forum

 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 
Getting some errors
Goto page Previous  1, 2
 
Post new topic   Reply to topic    nwnx.org Forum Index -> Linux technical support
View previous topic :: View next topic  
Author Message
Extreme



Joined: 28 Nov 2007
Posts: 135

PostPosted: Thu Jul 17, 2008 23:48    Post subject: Reply with quote

sweet. i got another issue that im making a different post about...

when i use screen -r nwserver to enter into the module in the shell...what is the command to screen back out? its annoying to have to logout once i screen in and have to re cd back
Back to top
View user's profile Send private message
virusman



Joined: 30 Jan 2005
Posts: 1020
Location: Russia

PostPosted: Thu Jul 17, 2008 23:49    Post subject: Reply with quote

Ctrl+A, then D - detach
screen -x - attach again
Back to top
View user's profile Send private message Visit poster's website Yahoo Messenger
Extreme



Joined: 28 Nov 2007
Posts: 135

PostPosted: Thu Jul 17, 2008 23:51    Post subject: Reply with quote

linux is not easy to learn Evil or Very Mad
Back to top
View user's profile Send private message
Extreme



Joined: 28 Nov 2007
Posts: 135

PostPosted: Fri Jul 18, 2008 0:01    Post subject: Reply with quote

i guess is hould make those ini and script changes as per the read me Embarassed
Back to top
View user's profile Send private message
Extreme



Joined: 28 Nov 2007
Posts: 135

PostPosted: Fri Jul 18, 2008 0:24    Post subject: Reply with quote

ok i went in and put in the 2 scripts that were in the nwnx_chat-0.3.5-linux under the names
    dmb_chat.nss
    nwnx_chat.nss

and when i did this im getting a compile error. I put both of these scripts in the module because they were not already in there. But i dont see an instance where nwnx_chat.nss is even used and there is a compile error on dmb_chat.nss on line 80? on this line int dmb_SendMessage

Code:
//::///////////////////////////////////////////////
//:: dmb_chat
//:: FileName
//:: Copyright (c) 2005 dumbo (dumbo@nm.ru)
//:: Copyright (c) 2006-2007 virusman (virusman@virusman.ru)
//:://////////////////////////////////////////////
/*
  include file with initialization and some helpers
*/
//:://////////////////////////////////////////////
//:: Created By: dumbo
//:: Created On: 2005-09-08
//:: Modified By: virusman
//:: Modified On: 2007-02-15
//:://////////////////////////////////////////////

string dmb_LIST_ITEM_NAME = "dmbPC_";
string dmb_PC_ID_NAME = "dmbID";

const int CHAT_CHANNEL_TALK        = 1;
const int CHAT_CHANNEL_SHOUT       = 2;
const int CHAT_CHANNEL_WHISPER     = 3;
const int CHAT_CHANNEL_PRIVATE     = 4;
const int CHAT_CHANNEL_SERVER_MSG  = 5;
const int CHAT_CHANNEL_PARTY       = 6;

//Send chat message
//nChannel - CHAT_CHANNEL_*
void dmb_SendMessage(object oSender, int nChannel, string sMessage, object oRecipient=OBJECT_INVALID);

void dmb_ChatInit()
{
    int i;
    object oMod = GetModule();
    // memory for chat text
    string sMemory;
    for (i = 0; i < 8; i++) // reserve 8*128 bytes
        sMemory += "................................................................................................................................";
    SetLocalString(oMod, "NWNX!INIT", "1");
    SetLocalString(oMod, "NWNX!CHAT!SPACER", sMemory);
}

string dmb_GetStringFrom(string s, int from = 1)
{
    return GetStringRight(s, GetStringLength(s) - from);
}

string dmb_GetSpacer()
{
    return GetLocalString(GetModule(), "NWNX!CHAT!SPACER");
}

void dmb_PCin(object oPC)
{
  if (!GetIsObjectValid(oPC)) return;
  object oMod = GetModule();
  SetLocalString(oPC, "NWNX!CHAT!GETID", ObjectToString(oPC)+"        ");
  string sID = GetLocalString(oPC, "NWNX!CHAT!GETID");
  int nID = StringToInt(sID);
  if (nID != -1)
  {
    SetLocalObject(oMod, dmb_LIST_ITEM_NAME + sID, oPC);
    SetLocalInt(oPC, dmb_PC_ID_NAME, nID);
  }
  DeleteLocalString(oPC, "NWNX!CHAT!GETID");
}

int dmb_GetClientID(object oPC)
{
    if (!GetIsObjectValid(oPC)) return -1;
    if (!GetIsPC(oPC)&&!GetIsPossessedFamiliar(oPC)&&!GetIsDM(oPC)&&!GetIsDMPossessed(oPC)) return -1;
    SetLocalString(oPC, "NWNX!CHAT!GETID", ObjectToString(oPC)+"        ");
    string sID = GetLocalString(oPC, "NWNX!CHAT!GETID");
    int nID = StringToInt(sID);
    return nID;
}

int dmb_SendMessage(object oSender, int nChannel, string sMessage, object oRecipient=OBJECT_INVALID)
{
    if (!GetIsObjectValid(oSender)) return;
    if (FindSubString(sMessage, "¬")!=-1) return;
    if (nChannel == CHAT_CHANNEL_PRIVATE && !GetIsObjectValid(oRecipient)) return;
    SetLocalString(oSender, "NWNX!CHAT!SPEAK", ObjectToString(oSender)+"¬"+ObjectToString(oRecipient)+"¬"+IntToString(nChannel)+"¬"+sMessage);
    if(GetLocalString(oSender, "NWNX!CHAT!SPEAK")=="1") return TRUE;
    else return FALSE;
}

void dmb_PCout(object oPC)
{
  if (!GetIsObjectValid(oPC)) return;
  int nID = GetLocalInt(oPC, dmb_PC_ID_NAME);
  DeleteLocalInt(oPC, dmb_PC_ID_NAME);
  DeleteLocalObject(GetModule(), dmb_LIST_ITEM_NAME + IntToString(nID));
}

object dmb_getPC(int nID)
{
  return GetLocalObject(GetModule(), dmb_LIST_ITEM_NAME + IntToString(nID));
}
//void main() {}


dmb_chat.nss(80): ERROR: RETURN TYPE AND FUNCTION TYPE MISMATCHED
Back to top
View user's profile Send private message
SpiderX



Joined: 14 Aug 2007
Posts: 12

PostPosted: Fri Jul 18, 2008 9:40    Post subject: Reply with quote

Extreme
Quote:
/*
include file with initialization and some helpers
*/

There`s no needs to compile this file, because this is an include, but mistake you`ve found have to be fixed.
I`m not familiar with nwnx_chat (it seems that this include related to this plugin), but I think that your problem can be fixed in such way:

int dmb_SendMessage(object oSender, int nChannel, string sMessage, object oRecipient=OBJECT_INVALID)
{
if (!GetIsObjectValid(oSender)) return FALSE;
if (FindSubString(sMessage, "¬")!=-1) return FALSE;
if (nChannel == CHAT_CHANNEL_PRIVATE && !GetIsObjectValid(oRecipient)) return FALSE;
SetLocalString(oSender, "NWNX!CHAT!SPEAK", ObjectToString(oSender)+"¬"+ObjectToString(oRecipient)+"¬"+IntToString(nChannel)+"¬"+sMessage);
if(GetLocalString(oSender, "NWNX!CHAT!SPEAK")=="1") return TRUE;
else return FALSE;
}
just add to script everything I marked as red.
And also don`t forget to remove '//' in last string before compile and put it back after.


Last edited by SpiderX on Fri Jul 18, 2008 9:45; edited 2 times in total
Back to top
View user's profile Send private message
Extreme



Joined: 28 Nov 2007
Posts: 135

PostPosted: Fri Jul 18, 2008 9:42    Post subject: Reply with quote

SpiderX wrote:
Extreme
Quote:
/*
include file with initialization and some helpers
*/

There`s no needs to compile this file since this an include, but mistake you`ve found have to be fixed.
I`m not familiar with nwnx_chat (it seems that this include related to this plugin), but I think that your problem can be fixed in such way:

int dmb_SendMessage(object oSender, int nChannel, string sMessage, object oRecipient=OBJECT_INVALID)
{
if (!GetIsObjectValid(oSender)) return FALSE;
if (FindSubString(sMessage, "¬")!=-1) return FALSE;
if (nChannel == CHAT_CHANNEL_PRIVATE && !GetIsObjectValid(oRecipient)) return FALSE;
SetLocalString(oSender, "NWNX!CHAT!SPEAK", ObjectToString(oSender)+"¬"+ObjectToString(oRecipient)+"¬"+IntToString(nChannel)+"¬"+sMessage);
if(GetLocalString(oSender, "NWNX!CHAT!SPEAK")=="1") return TRUE;
else return FALSE;
}
just add to script everything I marked as red.
And also don`t forget to remove '//' in last string before compile and put it back after.

yeah i added the compile line at the bottom. i always add it to every include i have cause just because an include doesnt need to compile, it can still have errors
Back to top
View user's profile Send private message
Extreme



Joined: 28 Nov 2007
Posts: 135

PostPosted: Sat Jul 19, 2008 1:50    Post subject: Reply with quote

well i hope this brought attn to this, but i had not realized that since i am using the SimTools, that this is not needed

thanks tho for all the help. I "think" its all working right
Back to top
View user's profile Send private message
Fireboar



Joined: 17 Feb 2008
Posts: 323

PostPosted: Sat Jul 19, 2008 18:12    Post subject: Reply with quote

Yeah, SIMTools uses a different (better) chat include to the default one that comes with the plugin. Although that should work right out of the box anyway.
Back to top
View user's profile Send private message
Extreme



Joined: 28 Nov 2007
Posts: 135

PostPosted: Sun Jul 20, 2008 12:48    Post subject: Reply with quote

now I just need to complete my mod so I can gets to test
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    nwnx.org Forum Index -> Linux technical support All times are GMT + 2 Hours
Goto page Previous  1, 2
Page 2 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group