dont pass the string "m9" to the other funtion. instead define it inside the other funtion. i got problems with switch in that case where all the values inside the switch block would get executed
Has the ability to issue warnings to users, edit and remove posts from the forum and to move topics to other boards. Upholds the rules of the forum. Moderates Chat Rooms.
That would be because you didn't place break statements at the end of each case.
More case statements is exactly what I am doing. this is the complete whole script if you want to see that. And I tried your script PROxFTW, but it didn't take the weapon either. Isn't it wierd that it just WONT work even if the script says that it will take the weapon the player has?
Because your not using the case statement right. it should be something like this:
again, i really suggest just using an if statement for all of this.
EDIT: Thought i'd make a little example to show why & the difference between the switch and if statements.
The cases only act as a separate if statement for each possibility. The only difference(i think) is that the switch function's different cases can apply to different entities at the same time while if statements can't.
Last Edit: May 12, 2014, 05:32:47 am by daedra descent
Has the ability to issue warnings to users, edit and remove posts from the forum and to move topics to other boards. Upholds the rules of the forum. Moderates Chat Rooms.
More case statements is exactly what I am doing. this is the complete whole script if you want to see that. And I tried your script PROxFTW, but it didn't take the weapon either.
Isn't it wierd that it just WONT work even if the script says that it will take the weapon the player has?
The point of the switch case is that there are multiple outcomes based on the value of the variable you are switching, so I combined all of your cases into one switch statement.
Oh, thank you so much it worked! I saw what I did wrong now, lol. Well, now I have learned how "case" works, now what's next I need to learn in scripting?