This site is a testing version, but all data is shared with the live forum.


Raised This Month: $ Target: $400
 0% 

Error: "New message started when msg '23' has not been sent yet"


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Spy123
BANNED
Join Date: Jul 2011
Location: Giurgiu / Romania
Old 01-18-2013 , 16:19   Error: "New message started when msg '23' has not been sent yet"
Reply With Quote #1

I tried to edit something in soccerjam, but when I score server breaks and get this error: "New message started when msg '23' has not been sent yet"

I found this topic, but there the player doesn't know where it comes error (https://forums.alliedmods.net/showth...67393)..well,I know where the error comes..this is the code:
PHP Code:
new explosion[TEAMS

public 
plugin_precache() {
    
precache_model(ball)
    
    
spr_beam     =     precache_model("sprites/beam14.spr")
    
spr_fire     =     precache_model("sprites/shockwave.spr")
    
spr_smoke     =     precache_model("sprites/steam1.spr")
    
spr_fxbeam     =     precache_model("sprites/lgtning.spr")
    
spr_burn     =     precache_model("sprites/plasma_exp.spr")
    
explosion[T]   =   precache_model("sprites/goalT.spr")
    
explosion[CT]   =   precache_model("sprites/goalCT.spr")
}

flameWave(myorig[3], team) {
    
message_begin(MSG_BROADCASTSVC_TEMPENTITYmyorig
    
write_byte(21
    
write_coord(myorig[0]) 
    
write_coord(myorig[1]) 
    
write_coord(myorig[2] + 16
    
write_coord(myorig[0]) 
    
write_coord(myorig[1]) 
    
write_coord(myorig[2] + 500
    
write_short(spr_fire)
    
write_byte(0)         // startframe 
    
write_byte(0)         // framerate 
    
write_byte(15)         // life 2
    
write_byte(50)         // width 16 
    
write_byte(10)         // noise 
    
write_byte(TeamColors[team][2])     // r 255
    
write_byte(TeamColors[team][1])         // g 0
    
write_byte(TeamColors[team][0])         // b 0
    
write_byte(255)     // brightness 
    
write_byte(10)     // speed 
    
message_end() 
    
    
message_begin(MSG_BROADCAST,SVC_TEMPENTITY,myorig
    
write_byte(21
    
write_coord(myorig[0]) 
    
write_coord(myorig[1]) 
    
write_coord(myorig[2] + 16
    
write_coord(myorig[0]) 
    
write_coord(myorig[1]) 
    
write_coord(myorig[2] + 500
    
write_short(spr_fire)
    
write_byte(0)         // startframe 
    
write_byte(0)         // framerate 
    
write_byte(10)         // life 2
    
write_byte(70)         // width 16 
    
write_byte(10)         // noise 
    
write_byte(TeamColors[team][2])     // r 255
    
write_byte(TeamColors[team][1])         // g 50
    
write_byte(TeamColors[team][0])         // b 0
    
write_byte(200)     // brightness 
    
write_byte(9)     // speed 
    
message_end() 
    
    
message_begin(MSG_BROADCAST,SVC_TEMPENTITY,myorig)
    
write_byte(21)
    
write_coord(myorig[0])
    
write_coord(myorig[1])
    
write_coord(myorig[2] + 16
    
write_coord(myorig[0]) 
    
write_coord(myorig[1]) 
    
write_coord(myorig[2] + 500
    
write_short(spr_fire)
    
write_byte(0)         // startframe 
    
write_byte(0)         // framerate 
    
write_byte(10)         // life 2
    
write_byte(90)         // width 16 
    
write_byte(10)         // noise 
    
write_byte(TeamColors[team][2])     // r 255
    
write_byte(TeamColors[team][1])     // g 100
    
write_byte(TeamColors[team][0])         // b 0    
    
write_byte(200)     // brightness 
    
write_byte(8)     // speed 
    
message_end() 
    
    
//Explosion2 
    
message_beginMSG_BROADCASTSVC_TEMPENTITY
    
write_byte(12
    
write_coord(myorig[0]) 
    
write_coord(myorig[1]) 
    
write_coord(myorig[2])
    
write_byte(80)     // byte (scale in 0.1's) 188 
    
write_byte(10)     // byte (framerate) 
    
message_end() 
    
    
//TE_Explosion 
    
new id
    message_begin
MSG_BROADCASTSVC_TEMPENTITY 
    
write_byte(3)
    
write_byte(id)
    
write_coord(myorig[0]) 
    
write_coord(myorig[1]) 
    
write_coord(myorig[2])
    
write_short (explosion[get_user_team(id)])
    
write_byte(65)     // byte (scale in 0.1's) 188 
    
write_byte(10)     // byte (framerate) 
    
write_byte(0)     // byte flags 
    
message_end() 
    
    
//Smoke 
    
message_beginMSG_BROADCAST,SVC_TEMPENTITY,myorig
    
write_byte(5)
    
write_coord(myorig[0]) 
    
write_coord(myorig[1]) 
    
write_coord(myorig[2]) 
    
write_short(spr_smoke)
    
write_byte(50)
    
write_byte(10)
    
message_end()
    
    return 
PLUGIN_HANDLED 
At the "TE_explosion" is the problem..cause if put without get_user_team(id),new id and new explosion[TEAMS] (only new explosion),it works...how can i fix this?

Last edited by Spy123; 01-18-2013 at 16:21.
Spy123 is offline
aaarnas
Veteran Member
Join Date: Jun 2008
Location: Lithuania
Old 01-18-2013 , 21:03   Re: Error: "New message started when msg '23' has not been sent yet"
Reply With Quote #2

The problem should be, that get_user_team(id) may calling another messages when you haven't finished this (message_end()).
You should check value before message_begin, but looking at plugin logic, flameWave(myorig[3], team) "team" already should be what you need. So:
write_short (explosion[get_user_team(id)])
-->>
write_short (explosion[team])

But it's just a guess, because I see only a part of code.
__________________
My plugins:
[ZP] ZM_VIP (v2.0.0 is comming. v1.9.1 BETA is out!)

aaarnas is offline
Old 01-19-2013, 03:58
NiHiLaNTh
This message has been deleted by NiHiLaNTh. Reason: Stupid
Spy123
BANNED
Join Date: Jul 2011
Location: Giurgiu / Romania
Old 01-19-2013 , 14:17   Re: Error: "New message started when msg '23' has not been sent yet"
Reply With Quote #3

@aaarnas...god bless you! It works now Thanks a lot...
Spy123 is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 17:17.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode