Blockland Forums > Modification Help
Client Variables
<< < (3/4) > >>
lordician:

--- Quote from: MegaScientifical on June 06, 2011, 05:08:23 PM ---THAT'S it. I was trying to remember how to do that, and was thinking "forget, did I really forget so much?" Thank you, that's what I wanted. That's why I made my stuff tiny. I'll edit it just in case, though. Again, thank you.

Still need to remember the simplest way to check if a string has more than just numbers in it. Someone remind us? I have my old crap method in there, couldn't find the good method someone told me once in my code...

--- End quote ---
Hmm it was nothing big. :P
I use it like always when i have to prgram for school.

Now to the easy way to check if it is a number....
I'm gonna search for that.
tyler0:
umm why doesn't this work???


--- Code: ---function serverCmdsetCash(%client, %n) {
   if(%client.isAdmin && %n !$= mFloatLength(%n, 0) && %n <= 0) {
      %client.cash += %n;
  commandToClient(%client, 'centerPrint', "You currently have $" @ %client.cash,3);
   }
}
--- End code ---
lordician:

--- Quote from: tyler0 on June 06, 2011, 05:24:17 PM ---umm why doesn't this work???


--- Code: ---function serverCmdsetCash(%client, %n) {
   if(%client.isAdmin && %n !$= mFloatLength(%n, 0) && %n <= 0) {
      %client.cash += %n;
  commandToClient(%client, 'centerPrint', "You currently have $" @ %client.cash,3);
   }
}
--- End code ---

--- End quote ---
commandToClient when you are allready in the client?
centerPrint("You currently have $" @ %client.cash,3);
Should do the trick i suppose. :P
tyler0:

--- Quote from: lordician on June 06, 2011, 05:32:17 PM ---commandToClient when you are allready in the client?
centerPrint("You currently have $" @ %client.cash,3);
Should do the trick i suppose. :P

--- End quote ---
nope :/ didn't give any result

this is wat this function looks like now

--- Code: ---function serverCmdsetCash(%client, %n) {
   if(%client.isAdmin && %n !$= mFloatLength(%n, 0) && %n <= 0) {
      %client.cash += %n;
  centerPrint("You currently have $" @ %client.cash,3);
   }
}
--- End code ---
lordician:

--- Quote from: tyler0 on June 06, 2011, 05:37:53 PM ---nope :/ didn't give any result

this is wat this function looks like now

--- Code: ---function serverCmdsetCash(%client, %n) {
   if(%client.isAdmin && %n !$= mFloatLength(%n, 0) && %n <= 0) {
      %client.cash += %n;
  centerPrint("You currently have $" @ %client.cash,3);
   }
}
--- End code ---

--- End quote ---
Does the console give any error?
Otherwise, place an echo to find out where it goes wrong.
echo("Hello i am an echo lol");
Navigation
Message Index
Next page
Previous page

Go to full version