-=-
Menu
Tournaments
Profile
Poll
Should the new slope feature be disabled for every map or should we edit only affected maps?
Disabled for every map
bb vote bb bb
3 (50%)
Only affected maps
bb vote bb bb
3 (50%)
Votes: 6
If you want to vote, log in first.

comment

Latest videos
Latest comments
Latest matches
flag -t3> [13:01] RFHflag
flag -t3> [07:02] RFHflag
flag [CDF] [04:03] RFHflag
flag -t3> [08:01] RFHflag
flag [CDF] [12:06] -t3>flag
flag RFH [05:02] -t3>flag
flag -t3> [06:04] RFHflag
flag -t3> [10:09] [CDF]flag
flag RFH [16:06] CCflag
flag [CDF] [04:03] -t3>flag
Latest forum posts
By: Vivando, in: 2023 CTF Level Making Contest » JJ2 related 2023-04-15 19:32
Here's my entry: https://www.jazz2online.com/downl...
By: FawFuL, in: 2023 CTF Level Making Contest » JJ2 related 2023-04-12 18:27
My entry: https://www.jazz2online.com/downloads/92...
By: PurpleJazz, in: 2023 CTF Level Making Contest » JJ2 related 2023-04-03 22:42
Here is my entry: https://www.jazz2online.com/down...
By: Krzysiek, in: 2023 CTF Level Making Contest » JJ2 related 2022-12-14 20:08
December 31st 2023 POG
By: DanZeal, in: 2023 CTF Level Making Contest » JJ2 related 2022-12-14 17:58
;-)
By: Vivando, in: 2023 CTF Level Making Contest » JJ2 related 2022-12-14 15:46
:cake:
By: MasterSven, in: 2023 CTF Level Making Contest » JJ2 related 2022-12-13 22:13
Let us secure the joy of playing JJ2 for the futur...
By: MasterSven, in: Learning battle levels » JJ2 related 2022-12-06 11:14
Its mostly about playing, playing and playing more...
By: koulmnballar, in: Learning battle levels » JJ2 related 2022-10-14 15:50
What makes it so that some players can "know" a ba...
By: koulmnballar, in: =-> How`d the "bomb scene" event become handled differently within the flowchart of plus-evolution? » JJ2 related 2022-08-23 17:02
[b][s]=->[/s][/b] [u]How`d the [b]"[i]bomb scene[/...
By: koulmnballar, in: Jetty Banned From JazzJackrabbit » JJ2 related 2022-08-17 01:25
https://www.youtube.com/watch?v=D-hLh63iuSI ^ thi...
By: dinolabis, in: Jetty Banned From JazzJackrabbit » JJ2 related 2022-08-13 01:42
https://www.pukenukem.com/jety/ This is real ?....
By: koulmnballar, in: What have you done to Clippy?! » Off topic 2022-07-20 19:38
[quote]Web Browsing Advisory[/quote] And in the w...
By: koulmnballar, in: What have you done to Clippy?! » Off topic 2022-07-09 23:29
There used to be a paperclip named Clippy, who liv...
By: DanZeal, in: Royal Families of JJ2 » Off topic 2022-07-05 10:46
[quote="Grytolle"][quote="Anubis"]Grytolle and Lee...
By: Grytolle, in: Royal Families of JJ2 » Off topic 2022-06-29 17:11
[quote="Anubis"]Grytolle and Leen both CC[/quote] ...
By: koulmnballar, in: maps 2 inspire UR lvl(s) » Clan talk 2022-06-24 19:24
^ -- East village is actually the pangaean combo ...
By: Toni, in: maps 2 inspire UR lvl(s) » Clan talk 2022-06-23 22:47
The first image looks like something we already ha...
By: Brinko, in: maps 2 inspire UR lvl(s) » Clan talk 2022-06-14 20:11
australia is sus
By: koulmnballar, in: maps 2 inspire UR lvl(s) » Clan talk 2022-06-14 17:49
*** WARNING: IMAGES IN THIS POST COULD B- RESIZED ...
By: qr-s-PL43, in: -How do Egyptian / 1337speak differ? » Clan talk 2022-06-07 01:43
That`s interesting about the [b]"ch"[/b] and [b]"s...
By: Anubis, in: -How do Egyptian / 1337speak differ? » Clan talk 2022-06-04 09:51
This typography is sometimes used in other languag...
By: qr-s-PL43, in: -How do Egyptian / 1337speak differ? » Clan talk 2022-06-03 00:28
-How do Egyptian / 1337speak differ? FYI (for y...
By: qr-s-PL43, in: « ? should esports be illegal in the confederacy ¿ » » Off topic 2022-06-02 17:17
[u][b]«[/b] ? should esports be illegal in the co...
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:
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.