Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting
FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 08-29-2011, 07:28 PM
Crow Crow is offline
ǝɔɐɹq ʎןɹnɔ
Crow's Avatar
Join Date: Dec 2006
Location: Germany
Posts: 5,153
Crow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond repute
Why are you using a thiso prefix there? Should work with a regular this prefix.
Reply With Quote
  #2  
Old 08-29-2011, 08:25 PM
Astram Astram is offline
Era iPhone PR
Astram's Avatar
Join Date: Aug 2010
Posts: 324
Astram can only hope to improve
Send a message via AIM to Astram
Quote:
Originally Posted by Crow View Post
Why are you using a thiso prefix there? Should work with a regular this prefix.
In a different part of the script im using thiso. because well I need it
__________________
-Toad
The worlds biggest Toad fan...
Era iPhone FTW!


Reply With Quote
  #3  
Old 08-29-2011, 08:46 PM
Crow Crow is offline
ǝɔɐɹq ʎןɹnɔ
Crow's Avatar
Join Date: Dec 2006
Location: Germany
Posts: 5,153
Crow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond repute
But you do not need it in this case. You only need that particular prefix if you want to reference to the NPC the code is executed in while being in another NPC's scope, like inside some of this stuff:
PHP Code:
with (npc) {
  
// boo

Reply With Quote
  #4  
Old 08-29-2011, 11:01 PM
Astram Astram is offline
Era iPhone PR
Astram's Avatar
Join Date: Aug 2010
Posts: 324
Astram can only hope to improve
Send a message via AIM to Astram
Quote:
Originally Posted by Crow View Post
But you do not need it in this case. You only need that particular prefix if you want to reference to the NPC the code is executed in while being in another NPC's scope, like inside some of this stuff:
PHP Code:
with (npc) {
  
// boo

Would that mess up the script like the problem im having...
__________________
-Toad
The worlds biggest Toad fan...
Era iPhone FTW!


Reply With Quote
  #5  
Old 08-29-2011, 11:03 PM
Crow Crow is offline
ǝɔɐɹq ʎןɹnɔ
Crow's Avatar
Join Date: Dec 2006
Location: Germany
Posts: 5,153
Crow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond repute
Quote:
Originally Posted by Astram View Post
Would that mess up the script like the problem im having...
Just try using a this prefix instead of the thiso one.
Reply With Quote
  #6  
Old 08-29-2011, 11:07 PM
Astram Astram is offline
Era iPhone PR
Astram's Avatar
Join Date: Aug 2010
Posts: 324
Astram can only hope to improve
Send a message via AIM to Astram
Quote:
Originally Posted by Crow View Post
Just try using a this prefix instead of the thiso one.
Alright, gotcha, but do you know why the array isnt displaying anything besides this.rights[0]
__________________
-Toad
The worlds biggest Toad fan...
Era iPhone FTW!


Reply With Quote
  #7  
Old 08-29-2011, 11:10 PM
Crow Crow is offline
ǝɔɐɹq ʎןɹnɔ
Crow's Avatar
Join Date: Dec 2006
Location: Germany
Posts: 5,153
Crow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond repute
Quote:
Originally Posted by Astram View Post
Alright, gotcha, but do you know why the array isnt displaying anything besides this.rights[0]
Dunno. I was being lazy and assumed that the wrong prefix was the only problem. Let me take a closer look..

Edit: What do you want to do, anyway? Your conditions seem strange; you also got your operators the wrong way (=> and =< instead of >= and <=, but I'm not sure if that even matters). Also, you're converting an integer to a string for your array index here:
PHP Code:
this.selected thiso.rights[(@this.selectedid 1)]; 
Which isn't even necessary. This should do:
PHP Code:
this.selected this.rights[this.selectedid 1]; 
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 02:05 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.