Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Script Help cs not working on other computer
darksky Offline
Member

Posts: 52
Threads: 8
Joined: Nov 2012
Reputation: 2
#5
RE: cs not working on other computer

i tried to start every map using each as the startmap.
two maps script files are causing the crashs.

the one i already mentioned above
Spoiler below!

map file Hub.map

http://i.imagebanana.com/img/rb96gj5k/error.jpg

void debug(const string text){
    AddDebugMessage(text,false);
}

const int mustRounds = 3;
int rounds = 0;
bool right1 = false;
bool right2 = false;

void rightround(string &in asParent, string &in asChild, int alState){
    if (asChild == "ScriptRight_1"){
        debug("right 1 , right2 == "+right2);  //  line 112
        if (!right2){
            right1 = true;
        }else{
            rounds--;
            right2 = false;
        }
    }
    if (asChild == "ScriptRight_2"){
        debug("right 2 , right1 == "+right1);  // line 121
        if (!right1){
            right2 = true;
        }else{
            rounds++;
            right1 = false;
        }
    }
    debug(rounds+" / "+mustRounds);
    if (rounds >0){
        SetEntityActive("changeWall_1",true);
        SetEntityActive("changeWall_2",false);
        if(rounds >= mustRounds){
            SetEntityActive("changeWall_3",false);
            SetEntityActive("changeDoorframe_1",true);
            SetEntityActive("changeDoorway_1",true);        
        }else{
            SetEntityActive("changeWall_3",true);
            SetEntityActive("changeDoorframe_1",false);
            SetEntityActive("changeDoorway_1",false);
        }
    }else{
        SetEntityActive("changeWall_1",false);
        SetEntityActive("changeWall_2",true);
        SetEntityActive("changeWall_3",true);
        SetEntityActive("changeDoorframe_1",false);
        SetEntityActive("changeDoorway_1",false);
    }
}


and this one

map file endboss.map

http://i.imagebanana.com/img/lnmqv41t/error2.jpg

the lines mentioned in this error message:
bool[] ready(2,false);  // line 100
string[] loaded(2,"");  // line 101
int hitcount = 0;

void setReady(string &in asParent, string &in asChild, int alState){
    string s = StringSub(asChild, 10, 1);
    debug("substring : "+s);
    if (s=="0"){
        ready[0] = true;
        loaded[0] = asParent;
    }else{    
        if (s=="1") {
            ready[1] = true;
            loaded[1] = asParent;
        }
    }
    debug(asParent);
    ChangePlayerStateToNormal();
    SetEntityInteractionDisabled(asParent,true);
}
string lamp;

void fire(string &in asEntity){
    string s = StringSub(asEntity, 7, 1);
    debug("substring : "+s);
    if (s == "0"){
        AddPropImpulse(loaded[0], 8.4, 10, -10, "world");
        loaded[0] = "";
    }else{
        if (s == "1"){
            AddPropImpulse(loaded[1], -7.2, 10, -10, "world");
            loaded[1] = "";
        }
    }
    lamp = asEntity;
    GiveItemFromFile("tinderbox", "tinderbox.ent");
    AddTimer("t1",0.5,"off");    
}

could it be that the script engine is broken in the other computer? or do i miss some required frameworks / etc ?
02-25-2013, 04:21 PM
Find


Messages In This Thread
cs not working on other computer - by darksky - 02-25-2013, 02:33 PM
RE: cs not working on other computer - by darksky - 02-25-2013, 02:53 PM
RE: cs not working on other computer - by darksky - 02-25-2013, 04:21 PM



Users browsing this thread: 1 Guest(s)