So I have the code for bluntstuffy's soul chests and I get an error when trying to change one simple thing. Here is the part of code that supposedly has an error:
The error I get is a bad syntax on the 'else' statement, but I dont see what's wrong with it. The entire script works perfectly if I remove the 'if' and 'else' statements but I need this change in my map. I've also tried changing the else statement above to:
Code Snippet
Plaintext
else if(players.size <= 1)
But then I get bad syntax on the whole 'else if' line.
If you want scripts / features made for you, then contact me by PM or email / skype etc it will cost you tho so if you have no intention of reciprocating don't even waste my time
And do you have the second parenthesis? the "}" to close the function?
Code Snippet
Plaintext
chest_anims() { players = get_players(); if(players.size > 1) { chest_1_kills = 100; } else { chest_1_kills = 10; } chest_2_kills = 25; //this chest isnt used chest_3_kills = 45; //this chest isnt used chest_4_kills = 65; //this chest isnt used chest_5_kills = 90; //this chest isnt used chest_6_kills = 140; //this chest isnt used } // HERE, not sure why that would throw the error on the else statement though?
not sure about the getplayers(); I have it the same way I do above in one of my other scripts and it works fine. And yeah I have the closing parenthesis its just farther down because this is only the first segment of the chest_anims() thread
Otherwise, if you send your script over ill take a look. Its stuffys soul chests right?
also, can you show us a screenshot of the error cod is throwing?
I fixed the error but thanks anyway guys it ended up being an error with the zone_manager and idk how that managed to happen, but its all good now. So thanks again