Results 1 to 7 of 7

Thread: Unknown Identifier 'player' in script???

  1. #1
    Join Date
    May 2008
    Posts
    15
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Unknown Identifier 'player' in script???

    When i try my script, it says [Error] unknown identifier 'player' in script...

    Can someone please help with this.

  2. #2
    Join Date
    Jan 2008
    Location
    Frankfurt, Germany
    Posts
    742
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    in the declare players procedure and whenever you call a player, they are named "Players". So it would look like this:
    SCAR Code:
    Players[0].Name:='';
    or maybe:
    SCAR Code:
    if Players[CurrentPlayer].integers=5 then
    Hope that helped.
    There is nothing right in my left brain and there is nothing left in my right brain.

  3. #3
    Join Date
    Mar 2007
    Posts
    4,810
    Mentioned
    3 Post(s)
    Quoted
    3 Post(s)

    Default

    Quote Originally Posted by Pure1993 View Post
    in the declare players procedure and whenever you call a player, they are named "Players". So it would look like this:
    SCAR Code:
    Players[0].Name:='';
    or maybe:
    SCAR Code:
    if Players[CurrentPlayer].integers=5 then
    Hope that helped.

    SCAR Code:
    if Players[CurrentPlayer].integers :=5 then


  4. #4
    Join Date
    Oct 2006
    Location
    finland, helsinki
    Posts
    2,501
    Mentioned
    3 Post(s)
    Quoted
    2 Post(s)

    Default

    noobs lol

    its:

    SCAR Code:
    If(Players[Currentplayer].Integers[0-99] = 5)Then

    Code:
    • Narcle: I recall Jukka releasing a bunch of scripts like this before... Its how he rolls I think. rofl
    • Solarwind: Dude, you are like... t3h s3x.
    • Hy71194: JuKKa you're a machine! You released 3 scripts in 10 minutes! :O
    • benjaa: woah.... Jukka is the man Guildminer pwns all
    • NaumanAkhlaQ: And JuKKa Is my Her0!

  5. #5
    Join Date
    Dec 2006
    Location
    Copy pastin to my C#
    Posts
    3,788
    Mentioned
    8 Post(s)
    Quoted
    29 Post(s)

    Default

    Nauman, the : is for assigning, you compare using =, not := -.-

    Lmao JuKKa - kolmas kerta toden sanoo

  6. #6
    Join Date
    Jan 2008
    Location
    Frankfurt, Germany
    Posts
    742
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    @ Nauman: The "if...then" statement was how it should be used after the declared players procedure. for example, let's pretend intergers[0] represents the attack level you want to train to, and then the program checks if that level has already been reached. in this case it would look like this:
    SCAR Code:
    if Players[CurrentPlayer].Integers=GetSkillInfo('Attack',false) then
    begin
      Writeln('The wished level has been achieved!');
      NextPlayer(False);
    end;
    I think you mistook the meaning of the earlier example, because ":=" makes something equal, and just the "=" checks if something is equal, i really hope you knew that.... xD
    @Nuka: Why is the "[0-99]" needed/what does it do? i haver never used it nor have i ever seen anyone use it... I don't think it matters, does it?

    EDIT: Damn, N3ss3s was faster.... but please, can someone translate the thing he said to Jukka?

    EDIT 2: this is what i got out of a translator: "third occasion truly speak". So please someone explain to me, why do we need the [0-99]?
    There is nothing right in my left brain and there is nothing left in my right brain.

  7. #7
    Join Date
    Dec 2006
    Location
    Copy pastin to my C#
    Posts
    3,788
    Mentioned
    8 Post(s)
    Quoted
    29 Post(s)

    Default

    Kolmas kerta toden sanoo, means raw translated "third time tells the truth", which may sound stupid translated like that, there propably is some real English term...

    By [0..99] JuKKa means that any value from 0 to 99 there...

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Unknown identifier 'x' in script
    By xaviar in forum OSR Help
    Replies: 4
    Last Post: 07-03-2008, 12:26 AM
  2. Unknown identifier 'Tol' in script
    By Griff in forum OSR Help
    Replies: 6
    Last Post: 05-06-2008, 02:24 PM
  3. Unknown identifier!?!?! (powercutter script)
    By lil rahmer662 in forum OSR Help
    Replies: 3
    Last Post: 01-27-2008, 09:40 PM
  4. Replies: 1
    Last Post: 11-12-2007, 03:54 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •