Quote:
Originally Posted by iCoke
Hello, I posted it here because I didnt see anywere else to post it, but anyways I need help with this script. The problem is there is a syntax error.
Script:
function onPlayerchats()
{
if (player.chat == "/open")
{
if (player.weapons.index(findweapon("-Bank/Account")) > 0)
{
say2("You already have a bank account");
}
else
{
say2("You have opened a bank account!");
player.addWeapon("-Bank/Account");
}
}
|
You are missing a }. Should style it, makes those type of errors obvious and makes things just generally easier to read.
PHP Code:
function onPlayerchats(){
if (player.chat == "/open"){
if (player.weapons.index(findweapon("-Bank/Account")) > 0){
say2("You already have a bank account");
}
else{
say2("You have opened a bank account!");
player.addWeapon("-Bank/Account");
}
}