Problem with last bit of code
Moderator: GZDoom Developers
Forum rules
Contrary to popular belief, we are not all-knowing-all-seeing magical beings!
If you want help you're going to have to provide lots of info. Like what is your hardware, what is your operating system, what version of GZDoom/LZDoom/whatever you're using, what mods you're loading, how you're loading it, what you've already tried for fixing the problem, and anything else that is even remotely relevant to the problem.
We can't magically figure out what it is if you're going to be vague, and if we feel like you're just wasting our time with guessing games we will act like that's what you're really doing and won't help you.
Contrary to popular belief, we are not all-knowing-all-seeing magical beings!
If you want help you're going to have to provide lots of info. Like what is your hardware, what is your operating system, what version of GZDoom/LZDoom/whatever you're using, what mods you're loading, how you're loading it, what you've already tried for fixing the problem, and anything else that is even remotely relevant to the problem.
We can't magically figure out what it is if you're going to be vague, and if we feel like you're just wasting our time with guessing games we will act like that's what you're really doing and won't help you.
-
- Posts: 3
- Joined: Wed Sep 23, 2020 2:48 am
Problem with last bit of code
on the last bit it says scrip error missing string (unexpected end of file)
- Graf Zahl
- Lead GZDoom+Raze Developer
- Posts: 49067
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: Problem with last bit of code
You need to provide a little bit of information. Yes, you got an error, no, we are not clairvoyants, we have no idea what you did and what the error says so happy guessing...
-
- Posts: 3
- Joined: Wed Sep 23, 2020 2:48 am
Re: Problem with last bit of code
Im sure i send the file to it but here maybe you can tell me what i did wrong
ACTOR Crazydave: DoomPlayer {
Player.WeaponSlot 1, Fist, Peashooter
Player.WeaponSlot 2, Pistol
Player.WeaponSlot 3, Shotgun, Supershotgun
Player.WeaponSlot 4, Chaingun
Player.WeaponSlot 5, RocketLauncher
Player.WeaponSlot 6, PlasmaRifle
Player.WeaponSlot 7, BFG9000
}
"ACTOR Peashooter: Weapon Chainsaw 20000 {
Weapon.SelectionOrder 50
Weapon.Ammouse 1
Weapon.AmmoType ('Clip')
Inventory.PickupMessage 'You grew a plant'
States {
Spawn:
PEA E -1
Stop
Select:
PEAS A 1 A_Raise
Loop
Deselect:
PEAS A 1 A_lower
Loop
Ready:
PEAS A A_WeaponReady
Loop
Fire:
PEAS BC 4
Goto PeaShoot
{PeaShoot:
PEA C 0 A_PlaySound('weapon/FirePea',CHAN_WEAPON, 1)
PEA C 0 A_Recoild (4)
PEA C 5 A_FireCustomMissile('Pea',0,2,0,-8)
PEA B 5
PEA B 0 A_Refire('PeaShoot')
Goto Ready
}
}
'ACTOR Pea : Actor 20001 {
+RANDOMIZE
Decal 'Scorch'
Projectile
Radious 6
Height 8
Speed 20
Damage 25
DeathSound 'weapons/plasmax'
'States {
Spawn:
PEAS D 4 Bright
loop
Death:
PEAS D 4 Bright
Stop}
}
ACTOR Crazydave: DoomPlayer {
Player.WeaponSlot 1, Fist, Peashooter
Player.WeaponSlot 2, Pistol
Player.WeaponSlot 3, Shotgun, Supershotgun
Player.WeaponSlot 4, Chaingun
Player.WeaponSlot 5, RocketLauncher
Player.WeaponSlot 6, PlasmaRifle
Player.WeaponSlot 7, BFG9000
}
"ACTOR Peashooter: Weapon Chainsaw 20000 {
Weapon.SelectionOrder 50
Weapon.Ammouse 1
Weapon.AmmoType ('Clip')
Inventory.PickupMessage 'You grew a plant'
States {
Spawn:
PEA E -1
Stop
Select:
PEAS A 1 A_Raise
Loop
Deselect:
PEAS A 1 A_lower
Loop
Ready:
PEAS A A_WeaponReady
Loop
Fire:
PEAS BC 4
Goto PeaShoot
{PeaShoot:
PEA C 0 A_PlaySound('weapon/FirePea',CHAN_WEAPON, 1)
PEA C 0 A_Recoild (4)
PEA C 5 A_FireCustomMissile('Pea',0,2,0,-8)
PEA B 5
PEA B 0 A_Refire('PeaShoot')
Goto Ready
}
}
'ACTOR Pea : Actor 20001 {
+RANDOMIZE
Decal 'Scorch'
Projectile
Radious 6
Height 8
Speed 20
Damage 25
DeathSound 'weapons/plasmax'
'States {
Spawn:
PEAS D 4 Bright
loop
Death:
PEAS D 4 Bright
Stop}
}
- m8f
-
- Posts: 1445
- Joined: Fri Dec 29, 2017 4:15 am
- Preferred Pronouns: He/Him
- Operating System Version (Optional): Manjaro Linux
- Location: Siberia (UTC+7)
- Contact:
Re: Problem with last bit of code
1. remove quote characters before ACTOR Peashooter and ACTOR Pea. You confused the engine with these unexpected quotes.
2. remove "Weapon" from ACTOR Peashooter: Weapon Chainsaw 20000. You inherit from Chainsaw.
3. remove parentheses from Weapon.AmmoType ('Clip').
4. remove braces around PeaShoot state.
5. change single quotes to double quotes in Inventory.PickupMessage "You grew a plant"
6. change sprite name in the first line of Spawn state so it has 4 characters. The same for all lines in PeaShoot state.
7. in ready state, you missed the numeric duration before A_WeaponReady
8. replace single quotes with double quotes in A_PlaySound
9. change A_Recoild to A_Recoil
10. missing brace after States block in Peashooter actor.
11. typo in Radious in Pea Actor. Change it to Radius.
12. replace single quotes with double quotes in DeathSound in Pea actor.
13. replace single quotes with double quotes in A_FireCustomMissile.
14. replace single quotes with double quotes in A_Refire.
1. Keep consistent formatting. Like, align blocks of code with spaces or tabs, add spaces after commas. It will boost readability and help with dealing with syntax errors.
2. There was a lot of errors with this piece of code. It seems like it was written at once, and then you tried to load it. Instead, it's more productive to add small pieces of code step by step, and load the code after each step.
2. remove "Weapon" from ACTOR Peashooter: Weapon Chainsaw 20000. You inherit from Chainsaw.
3. remove parentheses from Weapon.AmmoType ('Clip').
4. remove braces around PeaShoot state.
5. change single quotes to double quotes in Inventory.PickupMessage "You grew a plant"
6. change sprite name in the first line of Spawn state so it has 4 characters. The same for all lines in PeaShoot state.
7. in ready state, you missed the numeric duration before A_WeaponReady
8. replace single quotes with double quotes in A_PlaySound
9. change A_Recoild to A_Recoil
10. missing brace after States block in Peashooter actor.
11. typo in Radious in Pea Actor. Change it to Radius.
12. replace single quotes with double quotes in DeathSound in Pea actor.
13. replace single quotes with double quotes in A_FireCustomMissile.
14. replace single quotes with double quotes in A_Refire.
Spoiler: In the end, your code will look like this:A little bit of advice:
1. Keep consistent formatting. Like, align blocks of code with spaces or tabs, add spaces after commas. It will boost readability and help with dealing with syntax errors.
2. There was a lot of errors with this piece of code. It seems like it was written at once, and then you tried to load it. Instead, it's more productive to add small pieces of code step by step, and load the code after each step.
-
- Posts: 3
- Joined: Wed Sep 23, 2020 2:48 am
Re: Problem with last bit of code
Ok then thanks for the advice