PDA

View Full Version : GetMyIP() [help]



songo
14th January 2014, 19:44
Hi,

There is a problem with:



test()
{
ip = getIP(self);
iprintlnbold(ip);
}

getIP(player)
{
return closer(430, player getEntityNumber());
}

I always get error :
Segmentation fault


Thanks a lot ;)

Mitch
14th January 2014, 20:43
What does dmesg say for the crash and what cod are you using?

songo
14th January 2014, 21:55
Server stop and show crash "Segmentation fault", when I use this script. I use 1.0 version.

Mitch
14th January 2014, 23:18
Server stop and show crash "Segmentation fault", when I use this script. I use 1.0 version.

When was your libcod compiled? (post first few lines of the startup log)
Because it is possible it wasn't supported then yet. (ip support for 1.0 was added around 2 months ago)

libcod versions are available here:

Build with https://github.com/M-itch/libcod
http://znation.nl/libcod/

Build with https://github.com/kungfooman/libcod
http://dbg.killtube.org/libcod/libs/
http://killtube.org/downloads/libcod/

songo
15th January 2014, 13:36
Thanks Mitch for answers! This link working :)(znation.nl/libcod)

Mitch
15th January 2014, 15:49
Thanks Mitch for answers! This link working :)(znation.nl/libcod)

I think your build version was build without ip and ping support. Good that it works. (in my build you can enable cracked with 'set sv_cracked 1')