Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting > New Scripting Engine (GS2)
FAQ Members List Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 12-11-2013, 11:13 PM
Jakov_the_Jakovasaur Jakov_the_Jakovasaur is offline
Deleted by Darlene159
Jakov_the_Jakovasaur's Avatar
Join Date: Sep 2013
Location: Deleted by Darlene159
Posts: 360
Jakov_the_Jakovasaur has much to be proud ofJakov_the_Jakovasaur has much to be proud ofJakov_the_Jakovasaur has much to be proud ofJakov_the_Jakovasaur has much to be proud ofJakov_the_Jakovasaur has much to be proud ofJakov_the_Jakovasaur has much to be proud ofJakov_the_Jakovasaur has much to be proud of
you need to set the this.items array outside of the gui container, because that is otherwise applying the array variable to the container itself instead of the parent object, which is then not being found within the onSelect event

then if you just use 'thiso' within gui container like shown in my example it will reference the parent object

you are also looping through the items array outside of the gui container, which is why the rows arent adding properly, and you are closing the onCreated() bracket in the wrong place

http://pastebin.com/vb9hhr7y
__________________
This signature has been deleted by Darlene159.
Reply With Quote
  #2  
Old 12-12-2013, 09:07 PM
iDigzy iDigzy is offline
Registered User
Join Date: Apr 2013
Posts: 44
iDigzy is on a distinguished road
Quote:
Originally Posted by Jakov_the_Jakovasaur View Post
you need to set the this.items array outside of the gui container, because that is otherwise applying the array variable to the container itself instead of the parent object, which is then not being found within the onSelect event

then if you just use 'thiso' within gui container like shown in my example it will reference the parent object

you are also looping through the items array outside of the gui container, which is why the rows arent adding properly, and you are closing the onCreated() bracket in the wrong place

http://pastebin.com/vb9hhr7y
Thanks, I'll take a look at it and see where I put brackets. I thought I had messed up when closing them, but I assumed I fixed it. I guess it was still a mess.
Reply With Quote
  #3  
Old 12-12-2013, 09:10 PM
callimuc callimuc is offline
callimuc's Avatar
Join Date: Nov 2010
Location: Germany
Posts: 1,015
callimuc is a splendid one to beholdcallimuc is a splendid one to beholdcallimuc is a splendid one to beholdcallimuc is a splendid one to beholdcallimuc is a splendid one to behold
Quote:
Originally Posted by iDigzy View Post
Thanks, I'll take a look at it and see where I put brackets. I thought I had messed up when closing them, but I assumed I fixed it. I guess it was still a mess.
thats why it is important to style your script
__________________
MEEP!
Reply With Quote
  #4  
Old 12-14-2013, 12:06 AM
iDigzy iDigzy is offline
Registered User
Join Date: Apr 2013
Posts: 44
iDigzy is on a distinguished road
Ok, I'm really not sure. I tried everything to get this to work. It seems I am missing something obvious or something of the sort? I took my script and fix everything mentioned so far. I also threw it through the gs2 beautifier by fowlplay to make sure I could find any errors if I was just not styling it right and placing parts in wrong spots still. I could not find anything D:. This is my current script would anyone be able to find where I am messing up?
http://pastebin.com/diQgMxh8
Reply With Quote
  #5  
Old 12-14-2013, 01:25 AM
Starfire2001 Starfire2001 is offline
Unholy Nation
Starfire2001's Avatar
Join Date: Dec 2010
Location: The streets.
Posts: 156
Starfire2001 will become famous soon enough
Quote:
Originally Posted by Jakov_the_Jakovasaur View Post
you need to set the this.items array outside of the gui container[/URL]
You still have this problem. And your brackets are still messed up. You have
PHP Code:
function Items.onSelect(temp.i) {
  
Price.text this.items[temp.i][1];

inside of onCreated.
__________________
-Ph8
Reply With Quote
  #6  
Old 12-14-2013, 03:22 AM
iDigzy iDigzy is offline
Registered User
Join Date: Apr 2013
Posts: 44
iDigzy is on a distinguished road
Quote:
Originally Posted by Starfire2001 View Post
You still have this problem. And your brackets are still messed up. You have
PHP Code:
function Items.onSelect(temp.i) {
  
Price.text this.items[temp.i][1];

inside of onCreated.
After re-reading that it finally occurred to me the mistake I kept making. Thanks
Reply With Quote
Reply


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 06:22 AM.


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