Jump to content

unexpected identifier, no clue how to fix


c_ry.uwu

Recommended Posts

If you're screencapping SLADE, it's a good idea to include the line numbers so that we can quickly see what "line 136" in the error message is. That can (but not always) tell you where the error is.

 

You're using the wrong syntax in the pain.VelFromAngle line. You don't have to declare the values you're passing as variables. That line should be:

pain.VelFromAngle(31, 13e7); 

Also you're going to want to null check pain, like

if (pain)
	{
	pain.angle = angle;
	pain.VelFromAngle(31, 13e7); 
	}

Because if SpawnMissile does not create the pain elemental -- let's say the spawn destination is blocked -- you'll be trying to do operations on data that doesn't exist and there will be a crash. So "if (pain)" makes sure that pain exists and is pointing at something.

 

I'm not sure if this is how you want to create a new attack ('extend class', etc.), but the next helpful poster can get into that...

Share this post


Link to post

thank you, im pretty new to modding the game, so i dont know all that much about it. also i meant to add the line numbers i even thought "hey i should def add these to the screenshot" and then i forgot lmao

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...