-=-
Menu
Tournaments
Profile
Poll
Latest videos
Latest comments
Latest matches
flag [CDF] [12:02] PWNS!flag
flag [CDF] [03:02] PWNS!flag
flag -t3> [03:02] [CDF]flag
flag -t3> [11:04] [CDF]flag
flag [CDF] [06:02] PWNS!flag
flag [CDF] [12:03] PWNS!flag
flag -t3> [08:01] [CDF]flag
flag -t3> [05:03] [CDF]flag
flag [CDF] [06:03] -t3>flag
flag -t3> [03:01] [CDF]flag
Latest forum posts
By: Slaz, in: Pointer cursor won't work in JAZZ1 w/o loading WIN31 » JJ2 related 2022-01-04 09:35
Jazz1 is a DOS program and cannot work windowed in...
By: Ashurna, in: -JJ2 lvls thread? » Clan talk 2021-10-14 21:28
cute: so why dont you go tell the robot manager; u...
By: KILLREADYSCORE, in: A beginner's guide to the game: "Jazz Jackrabbit 2" » Forum games 2021-10-14 04:03
[code] A beginner's guide to the game: "Jazz Jack...
By: KILLREADYSCORE, in: Pointer cursor won't work in JAZZ1 w/o loading WIN31 » JJ2 related 2021-10-12 07:45
[i][s][u][b]Pointer cursor won't work in JAZZ1 w/o...
By: KILLREADYSCORE, in: -JJ2 lvls thread? » Clan talk 2021-10-12 06:35
[i]Aside from the obvious maps that are already in...
By: KILLREADYSCORE, in: [MULTI] Domination map making contest! » JJ2 related 2021-10-12 05:55
Simply renaming the gamemode to ANYTHING other tha...
By: Splat, in: . . . jestes _3C_ M'S' » Off topic 2021-10-11 01:21
. . . jestes _3C_ M'S' [i]The year №№ won ...
By: Splat, in: Tertiary school ideas? » Off topic 2021-10-08 13:25
[u]Tertiary school[/u] ideas? ->During [u]posts...
By: Splat, in: Repeat login verification? » Site suggestions 2021-10-08 06:51
-I notice that on this website, there aren't seem...
By: Splat, in: It's about time to start wraping thingz up » Improving rules 2021-10-07 13:53
-For reference, I.M.O., recent versions of the mod...
By: Vivando, in: [MULTI] Domination map making contest! » JJ2 related 2021-10-06 20:53
Violet's entries are now finally added to the DOM ...
By: stijn, in: It's about time to start wraping thingz up » Improving rules 2021-09-07 14:24
Who would be in this next group? If you know C+...
By: Splat, in: It's about time to start wraping thingz up » Improving rules 2021-09-07 08:30
The curent "plus-team" has had [u]almost[/u]_[u]10...
By: Splat, in: JJ2 ladder clan comparisons » Clan talk 2021-08-06 12:54
I would like to attempt to conduct an upvalueing o...
By: Splat, in: Unoriginal team names should be issued infractions » Clan talk 2021-08-06 12:05
"Unoriginal team names should be issued infraction...
By: Slaz, in: JJ2 ladder clan comparisons » Clan talk 2021-07-07 22:17
CDF is still the sexiest clan. :flex:
By: MaximuS , in: JJ2 ladder clan comparisons » Clan talk 2021-06-28 14:05
Best post of 2021 :-D
By: Splat, in: JJ2 needs more strictly moderated servers » JJ2 related 2021-06-27 05:15
The URL below is a link to the Waybackmachine Arch...
By: Splat, in: JJ2 ladder clan comparisons » Clan talk 2021-06-19 04:34
JJ2 ladder clan comparisons =====================...
By: Splat, in: Royal Families of JJ2 » Off topic 2021-06-13 06:28
During the prior decade, I gradually tried to offe...
By: Splat, in: Watching broadcasts while playing CW is cheating » Improving rules 2021-06-13 04:00
That just means the rules are flawed; it should de...
By: SpazTron64, in: Funniest moments! » Forum games 2021-06-10 01:01
Hahaha oh my god, I see some of you have saved som...
By: MasterSven, in: Watching broadcasts while playing CW is cheating » Improving rules 2021-06-06 15:18
Yes during stopped games it could be unethically a...
By: MasterSven, in: Royal Families of JJ2 » Off topic 2021-06-06 15:12
Jenny's parents played JJ2 as well, so JJ2 is cros...
By: Vivando, in: Royal Families of JJ2 » Off topic 2021-06-06 11:44
Indeed Anubis, was gonna say that :D
By: Vivando, in: Watching broadcasts while playing CW is cheating » Improving rules 2021-06-06 11:43
True, unexpected breaks during the game can potent...
By: Anubis, in: Watching broadcasts while playing CW is cheating » Improving rules 2021-06-06 11:30
I did have it open to look at the chat after some ...
By: Anubis, in: Royal Families of JJ2 » Off topic 2021-06-06 11:23
Grytolle and Leen both CC
By: Vivando, in: Watching broadcasts while playing CW is cheating » Improving rules 2021-06-06 09:30
Typically all game streams have a delay of several...
By: Splat, in: Royal Families of JJ2 » Off topic 2021-06-06 02:22
Are there any JJ2 couples that have kids already? ...
By: Splat, in: Watching broadcasts while playing CW is cheating » Improving rules 2021-06-06 01:11
Watching broadcasts while playing CW is cheating.....
By: Vivando, in: JJ2 needs more strictly moderated servers » JJ2 related 2021-05-28 22:16
I agree. It would take a lot of effort from the se...
By: Anubis, in: JJ2 needs more strictly moderated servers » JJ2 related 2021-05-28 16:50
It's not nearly as bad as 10 years ago to be hones...
By: Splat, in: JJ2 needs more strictly moderated servers » JJ2 related 2021-05-21 23:51
JJ2 needs more strictly moderated servers... Pe...
By: Splat, in: Commenting Guide » Clan talk 2021-05-20 04:24
I had compiled this list of prior ladder seasons' ...
By: Anubis, in: Commenting Guide » Clan talk 2021-05-19 23:17
Nice one, checking the number of the season before...
By: Splat, in: Commenting Guide » Clan talk 2021-05-18 09:02
Commenting Guide In preparation for commenting ...
By: Vivando, in: Funniest moments! » Forum games 2021-05-15 22:22
Nice one!
By: MasterSven, in: Funniest moments! » Forum games 2021-05-15 22:03
[21:46:23] [CDF]Mango: who is the leader of t3 [2...
By: Splat, in: VPN should be required in CW's » Site suggestions 2021-05-12 17:00
VPN should be required in CW's For those who do...
More...!

JJnet's forum

«Latest posts» «Latest threads» «Search» «User CP»

     Need help with some angelscript coding! | [q] 2015-06-09 17:59
Gigoavatar
JJnet user

Posts: 2
0
Hello!

So i just joined this forum. But you may recognize me from playing at puke nukem tests since last few months.

Anyway i've been trying to write some sort of test manager in angel script. The problem im stuck at is using the jjSendPacket() and onReceive().

Heres the part of the code that ruins my TM:
Code:

void wyslij()
{
        jjSTREAM plikNicks("GigoNicks.asdat");
        if(!plikNicks.isEmpty()) jjSendPacket(plikNicks);
}
void onReceive(jjSTREAM &in plikDane, int fromClientID)
{
        int dataType;
        plikDane.pop(dataType);
        if(dataType >= 0)
        {
                dlugoscPliku = dataType;
                for(int i = 0; i < dlugoscPliku; i++)
                {
                        plikDane.push(userNicks[i]emo;
                }
        }
        if(dataType == -1)
        {
                for(int i = 0; i < dlugoscPliku; i++)
                {
                        plikDane.push(userPoints[i]emo;
                }
        }
        if(dataType == -2)
        {
                for(int i = 0; i < dlugoscPliku; i++)
                {
                        plikDane.push(userProgress[i]emo;
                }
        }
}


(few things and variables are named in polish, sorry for that)

EDIT: lol part of the code got changed to emoticons ( those parts: " ) ;" without space)

You can probably ignore the whole content of "void onReceive()" as I even tried removing it and still got the same issue.
Its the jjSendPacket itself that causes problems: When another player joins my server, he gets instantly kicked with the "server denied you" error.
By instantly I mean he can stay in the server for up to 2 seconds - but thats becouse the function wyslij() is called every 2 seconds (every 140 frames). And btw. this function is only called by host (dunno if it has anything to do with my issue)
I've been stuck at this problem for some longer time and cant quite figure it out - angelscript debug says nothing about that. As soon as i remove jjSendPacket() those errors stop occuring - but thats not quite how I want my TM to work...

I hope there are some angelscript experts on this forum.
Thanx in advance
Replies
KRSplatinum
avatar

JJnet user
Posts: 259
14
#1 | [q]2015-06-09 23:24
Why the semicolons just before the closing brackets? Is that needed? To me, a semicolon would indicate there will be another line of code before the closing brackets. I mean like instead of

Code:

{
 xyz;
 abc;
}


try:

Code:

{
 xyz;
 abc
}


Maybe that's just a mainstream tactic that doesn't apply in J2AS. Also it probably makes no difference
Gigo
avatar

JJnet user
Posts: 2
0
#2 | [q]2015-06-10 21:59
Well nevermind. I got it to work. The problem was caused by the packets being too big. Thanks to SE for help emo Thread can be closed now.