Problem with last bit of code

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.

Post a reply

Smilies
:D :) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :wink: :geek: :ugeek: :!: :?: :idea: :arrow: :| :mrgreen: :3: :wub: >:( :blergh:
View more smilies

BBCode is OFF
Smilies are ON

Topic review
   

Expand view Topic review: Problem with last bit of code

Re: Problem with last bit of code

by IgorAutomatik » Thu Sep 24, 2020 1:53 am

Ok then thanks for the advice

Re: Problem with last bit of code

by m8f » Wed Sep 23, 2020 10:10 pm

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:
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.

Re: Problem with last bit of code

by IgorAutomatik » Wed Sep 23, 2020 2:02 pm

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}
}

Re: Problem with last bit of code

by Graf Zahl » Wed Sep 23, 2020 3:23 am

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...

Problem with last bit of code

by IgorAutomatik » Wed Sep 23, 2020 2:57 am

on the last bit it says scrip error missing string (unexpected end of file)

Top