Install libcod for server cod2 1.3;
It does not work nothing is happening periodically. What is the problem?
waittillframeend;It is everywhere
After standing in self ClientCommand ();Attachment 917
Printable View
Install libcod for server cod2 1.3;
It does not work nothing is happening periodically. What is the problem?
waittillframeend;It is everywhere
After standing in self ClientCommand ();Attachment 917
Not sure, but I guess you use ClientCommand() but don't call the original function then. Can you post your callback code?
Private Message kung
Your solve Tally, I do not care!
I'm pretty sure kung would post the code + fix here when he receives it. Keep the thread open for a bit :)
Cannot see the error at first look, so I just post the code (thx for: no formatting, hence lost tabs, missing startznach() function, non-english variable names, makes it easy lol):
For reference, working example: http://killtube.org/showthread.php?1...Builtin-B3!%29
PHP Code:
CodeCallback_PlayerCommand(args)
{
probel=" ";
itogargs="";
prefix=startznach("prefix");
cmdsay=startznach("cmdsay");
cmdsayteam=startznach("cmdsayteam");
args = fixChatArgs(args);
//for(i=0; i<args.size; i++) //лагает сервер
itogargs+=args[1]+probel;
if(args.size>2)
{ itogargs+=args[2]+probel; }
if(args.size>3)
{ itogargs+=args[3]+probel; }
if(args.size>4)
{ itogargs+=args[4]+probel; }
if(args.size>5)
{ itogargs+=args[5]+probel; }
if(args.size>6)
{ itogargs+=args[6]+probel; }
if(args.size>7)
{ itogargs+=args[7]+probel; }
if(args.size>8)
{ itogargs+=args[8]+probel; }
if(args.size>9)
{ itogargs+=args[9]+probel; }
if(args.size>10)
{ itogargs+=args[10]+probel; }
if(args.size>11)
{ itogargs+=args[11]+probel; }
if(args[0]==cmdsay && isDefined(args[1]) && args[1]!="qwertyu12345678")
{
waittillframeend;
self thread printmessage(args[0], itogargs, cmdsay, cmdsayteam, prefix);
return;
}
if(args[0]==cmdsayteam && isDefined(args[1]) && args[1]!="qwertyu12345678")
{
waittillframeend;
self thread printmessage(args[0], itogargs, cmdsay, cmdsayteam, prefix);
return;
}
self ClientCommand();
}
printmessage(komu, smska, cmdsay, cmdsayteam, prefix)
{
if(komu==cmdsay)
{
if(self getGuid()==706843)
{
waittillframeend;
sendGameServerCommand(-1, "h \"^2[^3Админ^2]^7"+ bezcveta(self.name) +"^7: " + smska + "\"");
}
else
{
waittillframeend;
sendGameServerCommand(-1, "h \"^2[^7Игрок^2]^7"+ bezcveta(self.name) +"^7: " + smska + "\"");
}
}
if(komu==cmdsayteam)
{
if(self getGuid()==706843)
{
komanda=self.pers["team"];
players = getentarray("player", "classname");
for(i = 0; i < players.size; i++)
if(players[i].pers["team"]==komanda)
{
waittillframeend;
sendGameServerCommand(players[i] getEntityNumber(), "h \"^2[^3Админ^2] ^4[^5Команде^4]^7"+ bezcveta(self.name) +"^7: ^5" + smska + "\"");
}
}
else
{
komanda=self.pers["team"];
players = getentarray("player", "classname");
for(i = 0; i < players.size; i++)
if(players[i].pers["team"]==komanda)
{
waittillframeend;
sendGameServerCommand(players[i] getEntityNumber(), "h \"^2[^7Игрок^2] ^4[^5Команде^4]^7"+ bezcveta(self.name) +"^7: ^5" + smska + "\"");
}
}
}
}
Imma guess that he didnt try with developer 1 yet?
The error is not displayed
It's a timing issue - remove all the waittillframeends.
It's not a good idea to use any wait times while the game is loading and compiling.
I put waittillframeends is not a long time, so it was up to waittillframeends
The waittillframeend is actually needed if you respawn a client with this method (or wait 0.05 or any wait at all), but you should NEVER call the playercommand() function after a wait for the buffer in it will have been altered, resulting in undefined behaviour
As the waittillframeend is properly return;-d, i dont see much issues with it. However, as there is obviously an issue with the code (see OP), i'd advise to remove all code and just do a self clientcommand() in the callback, nothing else. See how that goes and add stuff from there, until it crashes again.
tl;dr: debug using normal methods
I rewrote the code does not once, did conceived in different ways, sometimes it turns out error, when you start card, monitor or predict its occurrence is not possible :(
I know the words in this sentence but i cannot, at any rate, create a good story out of this
Basically similar to this: http://funnyjunk.com/channel/4chan/U...+test/GeRBGTr/ but makes less sense even.