datagram.inc: File or Function Not Found - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: datagram.inc: File or Function Not Found (
/showthread.php?tid=274426)
datagram.inc: File or Function Not Found -
Sasino97 - 05.08.2011
I saw that datagram.inc is present with sa-mp server package. I tried to use it, and it didn't work, I searched on SA-MP Wiki, but there isn't any datagram function.
How can I use it?? It can be useful to (ad example) communicate with other servers.
This is the INCLUDE File:
pawn Код:
/* Datagram sending/receiving
*
* © Copyright 2005, ITB CompuPhase
* This file is provided as is (no warranties).
*/
#if defined _datagram_included
#endinput
#endif
#define _datagram_included
#pragma library DGram
native sendstring(const message[], const destination[]="");
native sendpacket(const packet[], size, const destination[]="");
native listenport(port);
forward @receivestring(const message[], const source[]);
forward @receivepacket(const packet[], size, const source[]);
Another thing: I noticed that Compuphase's original TIME.INC was modified, the original file is:
pawn Код:
/* Date/time functions
*
* © Copyright 2001-2005, ITB CompuPhase
* This file is provided as is (no warranties).
*/
#if defined _time_included
#endinput
#endif
#define _time_included
#pragma library Time
native gettime(&hour=0, &minute=0, &second=0);
native settime(hour=cellmin, minute=cellmin, second=cellmin);
native getdate(&year=0, &month=0, &day=0);
native setdate(year=cellmin, month=cellmin, day=cellmin);
native settimestamp(seconds1970);
native settimer(milliseconds, bool: singleshot=false);
native tickcount(&granularity=0);
native delay(milliseconds);
forward @timer();
But SA-MP's one has only 3 functions: gettime, getdate and tickcount. Why didn't they implement the other functions in sa-mp too? The time stamp can be useful.
Re: datagram.inc: File or Function Not Found -
Vince - 05.08.2011
I see no reason why you would need to
set time, date or timestamp. The current unix timestamp can be retrieved if you use gettime without parameters (i.e.
unixtime = gettime(); ).
Re: datagram.inc: File or Function Not Found -
Sasino97 - 05.08.2011
Quote:
Originally Posted by Vince
I see no reason why you would need to set time, date or timestamp. The current unix timestamp can be retrieved if you use gettime without parameters (i.e. unixtime = gettime(); ).
|
Thanks, I didn't know, but do you know why datagram doesn't work?