Author Topic: Frezzing people in a minigame.  (Read 696 times)

So i am wondering what I need to fix. I wanted to make this way so you could freeze people in the minigame.

function severcmdStop(%client)
if(isObject(%client.minigame))
{
 for(%i=0;%i<%client.minigame.numMembers;%i++)
 {
  %targetclient = %client.minigame.member[%i];
                %targetclient.player.setdatablock(PlayernomoveArmor);
               
 }
};


So could you show me what I need to fix i am new to scripting obviusly. So help would be aprreciated thanks.

Code: [Select]
function servercmdStop(%client)
{
    %minigame = %client.minigame;
    if(isObject(%minigame))
    {
   
for(%i=0 ;%i<%minigame.numMembers; %i++)
{
    %minigame.member[%i].player.setdatablock(PlayernomoveArmor);
}
    }
}

Formatting sucks :(
« Last Edit: September 20, 2009, 03:50:06 PM by Kalphiter »



I would just like to point out most of my code problems come from lack of being able to spell.Do you know a way to fix it.

I would just like to point out most of my code problems come from lack of being able to spell.Do you know a way to fix it.
1. "server" not "sever"
2. "};" does not belong on the end of functions, only the end of packages.
3. Didn't open the function up with a {
4. Missed a bracket that would close "if(isObject(%client.minigame))"

Thanks for all the help.
« Last Edit: September 20, 2009, 03:54:46 PM by Human Reaper »