Author Topic: Why is this simple script not working ?  (Read 305 times)

Legacy_paradogz

  • Newbie
  • *
  • Posts: 30
  • Karma: +0/-0
Why is this simple script not working ?
« on: June 21, 2015, 11:03:45 pm »


               

Hello,


 


I'm trying to get the IP adress stored in my database. I'm using speech from NWN FF. The rest works perfectly.


 


[...]


const int    CMD_IPLOCK           = 63;


[...]


   SetLocalInt(oSpeech,    "IPLOCK" ,       CMD_IPLOCK );


[...]


 


                 case CMD_IPLOCK:

                    {

                    SQLExecDirect("UPDATE idplayer SET IP='"+GetPCIPAddress(oPC)+"' WHERE Id="+sId+");

                    SendMessageToPC(oPC, GetName(oPC)+" ne pourra plus etre joue depuis une autre adresse IP");

                    WriteTimestampedLogEntry(GetName(oPC)+" ne pourra plus etre joue depuis une autre adresse IP");

                    SendMessageToAllDMs(GetName(oPC)+" ne pourra plus etre joue depuis une autre adresse IP");

                    break;

                    }


[...]


 


 


Does anyone know how I could make this work ? Nothing happens when I say *IPLOCK*


 


For example, this one works perfectly :


 


                 case CMD_PROTEGECDKEY:

                    {

                    SQLExecDirect("UPDATE idplayer SET CDKey='"+GetPCPublicCDKey(oPC)+"' WHERE Id="+sId);

                    SendMessageToPC(oPC, GetName(oPC)+" ne pourra desormais plus etre joue depuis un autre PC que celui que vous utilisez actuellement ("+GetPCPublicCDKey(oPC)+")");

                    WriteTimestampedLogEntry(GetName(oPC)+" ne pourra desormais etre joue qu'avec la clef CD "+GetPCPublicCDKey(oPC));

                    SendMessageToAllDMs(GetName(oPC)+" ne pourra desormais etre joue qu'avec la clef CD "+GetPCPublicCDKey(oPC));

                    break;

                    }


 


Thanks a lot for your help folks.