help

redhot69

amongus
im having poblems on this lua

addHook("playerthink",function(player)
if player.mo.skin = "Movieknux"
and player.mo.state = S_PLAY_GLIDE then
P_InstaThrust(player.mo, player.mo.angle, skins[player.mo.skin].normalspeed+30 *FRACUNIT)
end

unexpected symbol near " ="
 
= alone means “x becomes y” and is to be used for setting variables. Not to compare things in if statements.

== is to be used in if statements and means “x is the same as y”
 
= alone means “x becomes y” and is to be used for setting variables. Not to compare things in if statements.

== is to be used in if statements and means “x is the same as y”
ty ill try
it didnt work

addHook("playerthink",function(player)
if player.mo.skin == "Movieknux"
and player.mo.state = S_PLAY_GLIDE then
P_InstaThrust(player.mo, player.mo.angle, skins[player.mo.skin].normalspeed+30 *FRACUNIT)
end
 
Last edited:
ty ill try
it didnt work

addHook("playerthink",function(player)
if player.mo.skin == "Movieknux"
and player.mo.state = S_PLAY_GLIDE then
P_InstaThrust(player.mo, player.mo.angle, skins[player.mo.skin].normalspeed+30 *FRACUNIT)
end
You didn’t change the second part of the if statement.
I’ve already explained that a single = isn’t supposed to be used within an if statement.
 
You didn’t change the second part of the if statement.
I’ve already explained that a single = isn’t supposed to be used within an if statement.
you mean the player mo state part?
Post automatically merged:

still gave me an warning
addHook("playerthink",function(player)
if player.mo.skin == "Movieknux"
and player.mo.state == S_PLAY_GLIDE then
P_InstaThrust(player.mo, player.mo.angle, skins[player.mo.skin].normalspeed+30 *FRACUNIT)
end
 

Who is viewing this thread (Total: 1, Members: 0, Guests: 1)

Back
Top