hello. I’m not so good in scripting, i’m still learning. I do now know what’s wrong with this script. i think it is a parenthesis problem, but i have not noticed anything.
if (playerenters){toweapons -grab}
if (keypressed && keydown2(keycode(a,true)) {
setani grab,;
}
I want it to play grab ani when you press A. it is supposed to work even if there’s no item(solid) in front of you.
It might work but that’s not the problem. It’s the fact you’re using incorrect syntax!!!
You’re like alex when it comes to scripting, his scripts sucked because they were just copy and pasted together,
several timeouts, etc… Yet he thought he was top shit because the scripts worked.
If you refuse to correct your form, I for one refuse to help you.
oh. could you explain me what is in a correct syntax in my script? Sorry, but i’ve read the npc programming, and commands sheet, but there are some things i have not fully understood.
This might work but it’s wrong, each line needs a semicolon to end it. The correct way would be:
toweapons -grab;
That’s the only syntax error. Keep in mind you don’t need brackets if you only use one command for a statement.
Example:
This requires brackets since there’s 2 commands I need to execute
if (playerFarts){
message hahahaha!;
setcharani tease,;
}
However the following only needs one command and therefore brackets are not required
if (playerchats)message I be not interested in your shenanigans!;
However if you look in the debugger you’ll see the command is wrapped in brackets automatically.