![]() |
[SCRIPT] Script problem - Printable Version +- Frictional Games Forum (read-only) (https://www.frictionalgames.com/forum) +-- Forum: Amnesia: The Dark Descent (https://www.frictionalgames.com/forum/forum-6.html) +--- Forum: Custom Stories, TCs & Mods - Development (https://www.frictionalgames.com/forum/forum-38.html) +---- Forum: Development Support (https://www.frictionalgames.com/forum/forum-39.html) +---- Thread: [SCRIPT] Script problem (/thread-19057.html) |
Script problem - ooadrianoo - 11-02-2012 Hello I have a problem. My script doesn't work. PHP Code: void OnEnter () This part of my script and I don't know why. Can anyone help me? RE: Script problem - FlawlessHappiness - 11-02-2012 this: (string&in asTimer) Should be: (string &in asTimer) RE: Script problem - ooadrianoo - 11-02-2012 (11-02-2012, 09:00 PM)beecake Wrote: this: (string&in asTimer)Nothing changed. Still the same problem ._. RE: Script problem - Your Computer - 11-02-2012 I would assume that the value is never the ones in the if statement RE: Script problem - ooadrianoo - 11-02-2012 (11-02-2012, 09:13 PM)Your Computer Wrote: I would assume that the value is never the ones in the if statementExplain me why. RE: Script problem - Your Computer - 11-02-2012 (11-02-2012, 09:24 PM)ooadrianoo Wrote: Explain me why. It's not that it can't be, but that every time you've tested it the value was either 1, 3, 4 or 6. Perhaps i should have said "was" instead of "is." RE: Script problem - ooadrianoo - 11-02-2012 It works if I make it so: PHP Code: if (iRandoms > 4) PHP Code: else if(iRandoms < 4) But I don't understand why it works this way. RE: Script problem - ZodiaC - 11-02-2012 (11-02-2012, 09:24 PM)ooadrianoo Wrote: Explain me why.Because you make the iRandoms random from 1 to 7. In your first "if" it checks if it's bigger than 6 and in your "else if" you check if the iRandoms is equal to 2 or 5 So if the iRandoms is 1,3,4,6 the script will do nothing. RE: Script problem - ooadrianoo - 11-02-2012 (11-02-2012, 09:39 PM)ZodiaC Wrote:Thank you(11-02-2012, 09:24 PM)ooadrianoo Wrote: Explain me why.Because you make the iRandoms random from 1 to 7. RE: Script problem - ZodiaC - 11-02-2012 (11-02-2012, 09:51 PM)ooadrianoo Wrote:Your Welcome(11-02-2012, 09:39 PM)ZodiaC Wrote:Thank you(11-02-2012, 09:24 PM)ooadrianoo Wrote: Explain me why.Because you make the iRandoms random from 1 to 7. ![]() |