on the last bit it says scrip error missing string (unexpected end of file)
Re: Problem with last bit of code
Posted: Wed Sep 23, 2020 3:23 am
by Graf Zahl
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...
Re: Problem with last bit of code
Posted: Wed Sep 23, 2020 2:02 pm
by IgorAutomatik
Im sure i send the file to it but here maybe you can tell me what i did wrong
{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}
}
Re: Problem with last bit of code
Posted: Wed Sep 23, 2020 10:10 pm
by m8f
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.
Spoiler: In the end, your code will look like this:
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: Chainsaw 20000
{
Weapon.SelectionOrder 50
Weapon.Ammouse 1
Weapon.AmmoType "Clip"
Inventory.PickupMessage "You grew a plant"
States
{
Spawn:
PEAA E -1
Stop
Select:
PEAS A 1 A_Raise
Loop
Deselect:
PEAS A 1 A_lower
Loop
Ready:
PEAS A 1 A_WeaponReady
Loop
Fire:
PEAS BC 4
Goto PeaShoot
PeaShoot:
PEAA C 0 A_PlaySound("weapon/FirePea", CHAN_WEAPON, 1)
PEAA C 0 A_Recoil (4)
PEAA C 5 A_FireCustomMissile("Pea",0,2,0,-8)
PEAA B 5
PEAA B 0 A_Refire("PeaShoot")
Goto Ready
}
}
ACTOR Pea : Actor 20001
{
+RANDOMIZE
Decal 'Scorch'
Projectile
Radius 6
Height 8
Speed 20
Damage 25
DeathSound "weapons/plasmax"
States
{
Spawn:
PEAS D 4 Bright
loop
Death:
PEAS D 4 Bright
Stop
}
}
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.