Page 1 of 1
Need some guidance...
Posted: Mon Mar 14, 2005 6:04 am
by luftwaffetf
I have made a map and I've never scripted b 4, so I looked up some tut's for stuff I wanted to add to it. My map runs fine on my local machine as a server to test it, but when I add the .scr file to it I get this error and it crashes back to the war room. ERROR: CL_ParseGamestate:bad command byte:-1
I have no idea what this means or how to fix it...can someone help?
Posted: Mon Mar 14, 2005 7:50 am
by Grassy
I got the same error recently when trying to convert a sp map into an mp version. I can't really pin point what was causing the error but I did fix it by removing these lines from the original scr.
// $rubblesmoke anim start
// $new_fire anim stop
// $new_fire_1 anim stop
The error stopped once these lines were commented.
Dosn't really help you I spose seeing as yours is your own creation.
Posted: Mon Mar 14, 2005 8:14 am
by lizardkid
almost looks like an input error :S
-1 is a returned Unicode value after input is finished, dunno if MoH uses Unicode (stupid) or ASCII (good)
Posted: Mon Mar 14, 2005 8:15 pm
by jv_map
-1 is just a number
Anyway, luftwaffetf, that error sounds only remotely familiar... could you maybe post the script so that we can have a look at it?
Posted: Mon Mar 14, 2005 11:58 pm
by luftwaffetf
well...here it is! I made a small box map that works fine...but when I put the explosions in my larger map...it crashes.
Code: Select all
// Test
// ARCHITECTURE: :{bbf}:LuftWaffe|TF|
// SCRIPTING: :{bbf}:LuftWaffe|TF|
main:
// set scoreboard messages
setcvar "g_obj_alliedtext1" "Allied Objective:"
setcvar "g_obj_alliedtext2" "Storm the V2 Complex"
setcvar "g_obj_alliedtext3" "Axis Objective:"
setcvar "g_obj_axistext1" "Defend the Complex"
setcvar "g_obj_axistext2" ""
setcvar "g_obj_axistext3" "Map by :{bbf}:LuftWaffe|TF|"
setcvar "g_scoreboardpic" "none" // your score board picture
level waittill prespawn
exec global/DMprecache.scr
exec global/ambient.scr //yourmapname
// may want to make your own ambient sounds, read the tut
level.script = "maps/dm/test.scr"
// remember to put in your map name
level waittill spawn
thread boom1
thread boom2
thread boom3
thread boom4
end
//add more codes here after you add more features to your maps
boom1:
wait (randomfloat 5 + 10)
$boom1 anim start
radiusdamage $boom1 128 256
goto boom1
end
boom2:
wait (randomfloat 5 + 10)
$boom2 anim start
radiusdamage $boom2 128 256
goto boom2
end
boom3:
wait (randomfloat 5 + 10)
$boom3 anim start
radiusdamage $boom3 128 256
goto boom3
end
boom4:
wait (randomfloat 5 + 10)
$boom4 anim start
radiusdamage $boom4 128 256
goto boom4
end
Posted: Tue Mar 15, 2005 12:41 am
by Bjarne BZR
Try this script. I gave a parameter to
exec global/ambient.scr, you had not done that... either give it a music to play (like m6l1a), or comment out the entire line.
I also removed the code repetitions by doing a small change. And goto is the devil, so I replaced it with a while loop thar runs forever ( or at least until the map restarts

)
Code: Select all
// Test
// ARCHITECTURE: :{bbf}:LuftWaffe|TF|
// SCRIPTING: :{bbf}:LuftWaffe|TF|
main:
// set scoreboard messages
setcvar "g_obj_alliedtext1" "Allied Objective:"
setcvar "g_obj_alliedtext2" "Storm the V2 Complex"
setcvar "g_obj_alliedtext3" "Axis Objective:"
setcvar "g_obj_axistext1" "Defend the Complex"
setcvar "g_obj_axistext2" " "
setcvar "g_obj_axistext3" "Map by :{bbf}:LuftWaffe|TF|"
setcvar "g_scoreboardpic" "none" // your score board picture
level waittill prespawn
exec global/DMprecache.scr
exec global/ambient.scr m6l1a
// may want to make your own ambient sounds
// or use existing ones, read the tut
level.script = "maps/dm/test.scr"
// remember to put in your map name
level waittill spawn
thread boom $boom1
thread boom $boom2
thread boom $boom3
thread boom $boom4
end
//add more codes here after you add more features to your maps
boom local.bomber:
while(1)
{
wait (randomfloat 5 + 10)
local.bomber anim start
radiusdamage local.bomber 128 256
}
end
... try it, hope it works better.
Posted: Tue Mar 15, 2005 3:46 am
by luftwaffetf
thanks...I'll give it a try tomorrow...I gotta get to work

Posted: Tue Mar 15, 2005 9:23 am
by Grassy
I dunno, I still recon it's something to do with the anim command or model used, as I said above, once those lines were commented, I got the exact same error and crash back to desktop.
Grassy
Posted: Fri Mar 18, 2005 2:21 am
by luftwaffetf
Thanks Bjarne...works like a charm now