Author Topic: what is up with my code vInfinity  (Read 1770 times)

guys what is wrong with my code, i asked my coding friends and they can't even figure it out:
Quote
function servercmdrevive(%client, %tar) {
   %tar = findclientbyname(%tar);
   //we want to check if the player is admin so he can't go apestuff and revive his whole team
   if(!%client.isAdmin) {
      return; }
      //is the target even existent? are we even existent? are we a dream?
   if(!isObject(%tar)){
      messageclient(%client,'',"<color:ff0000>Target is invalid");
      return;
   }
   %tar.setdead(0);
   %tar.setlives(-1);
   %tar.spawnplayer();
   messageall('',"<color:00ff00>" @ %tar.name SPC "was revived by" SPC %client.name);
   //anti-abuse measure
   echo(%client.name SPC "revived" SPC %tar.name);
}

it says syntax error line 16, but apparently that doesn't mean it's line 16 with the syntax error

There are no syntax errors contained in the code you posted. Try restarting Blockland?

trying to exec(); throws a syntax error

There's nothing wrong with this and it works fine.

I'll try it with normal blockland, i'm using a dedicated server to host

code is working but not on dedi. weird.
thanks!