Graal Forums  

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

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 01-20-2007, 11:20 PM
wild8900 wild8900 is offline
Mr. Brightside
wild8900's Avatar
Join Date: Dec 2005
Posts: 418
wild8900 is an unknown quantity at this point
Send a message via MSN to wild8900
Array problem

Hey the string wont show up in this script. Whats wrong with it?
Its supposed to return "Town Main" for now but instead I get nothing.
PHP Code:
maparray="Town Main","Cadoan","Melmond","Saronia Village","Shoreville","Snowbound Village";
showimg 498,@Tempus Sans ITC@#s(maparray[0]),playerx-0.1,playery-3; 
Reply With Quote
  #2  
Old 01-20-2007, 11:46 PM
Tolnaftate2004 Tolnaftate2004 is offline
penguin.
Join Date: Jul 2004
Location: Berkeley, CA
Posts: 534
Tolnaftate2004 is a jewel in the roughTolnaftate2004 is a jewel in the rough
Send a message via AIM to Tolnaftate2004
Quote:
Originally Posted by wild8900 View Post
Hey the string wont show up in this script. Whats wrong with it?
Its supposed to return "Town Main" for now but instead I get nothing.
PHP Code:
maparray="Town Main","Cadoan","Melmond","Saronia Village","Shoreville","Snowbound Village";
showimg 498,@Tempus Sans ITC@#s(maparray[0]),playerx-0.1,playery-3; 
This is a pretty messy mix of attempted GS1 and GS2...
For GS1, use setstring maparray,"Town Main",...; and
PHP Code:
showtext #, #, #, font, style, #I(array,part); 
For GS2, use the array constructor, e.g. maparray = {"Town Main",...}, for an array, and
PHP Code:
showtext(#, #, #, "font", "style", array[part]); 
__________________
◕‿‿◕ · pfa · check yer syntax! · src

Killa Be: when i got that locker in 6th grade the only thing in it was a picture of a midget useing a firehose :/
Reply With Quote
  #3  
Old 01-21-2007, 02:17 AM
godofwarares godofwarares is offline
Webmaster
godofwarares's Avatar
Join Date: Dec 2006
Location: Florida
Posts: 552
godofwarares is on a distinguished road
Send a message via ICQ to godofwarares Send a message via AIM to godofwarares Send a message via MSN to godofwarares Send a message via Yahoo to godofwarares
Quote:
Originally Posted by wild8900 View Post
Hey the string wont show up in this script. Whats wrong with it?
Its supposed to return "Town Main" for now but instead I get nothing.
PHP Code:
maparray="Town Main","Cadoan","Melmond","Saronia Village","Shoreville","Snowbound Village";
showimg 498,@Tempus Sans ITC@#s(maparray[0]),playerx-0.1,playery-3; 
Well 1.) Thats now how you define an array.

GS1:
PHP Code:
setarray maparray,{"Town Main","Cadoan","Melmond","Saronia Village","Shoreville","Snowbound Village"};
showimg 498,@Tempus Sans ITC@#s(#I(maparray,0)),playerx-0.1,playery-3; 
or GS2:
PHP Code:
maparray = {"Town Main","Cadoan","Melmond","Saronia Village","Shoreville","Snowbound Village"};
showtext(498,player.x-0.1,player.y-3,Tempus Sans ITC,c,maparray[0]); 
__________________
What signature? I see no signature?
Reply With Quote
  #4  
Old 01-21-2007, 02:32 AM
Inverness Inverness is offline
Incubator
Inverness's Avatar
Join Date: Aug 2004
Location: Houston, Texas
Posts: 3,613
Inverness is a jewel in the roughInverness is a jewel in the rough
Uh for GS1, setarray name,length; creates a blank array. Same in GS2 also.
And if you want to make array in GS1 you use setstring name,var0,var1,var2,var3,etc.;

Also your little bit of GS2 code is wrong.
PHP Code:
showtext(498,player.x-0.1,player.y-3,"Tempus Sans ITC","c",maparray[0]); 
That is correct.
__________________
Reply With Quote
  #5  
Old 01-24-2007, 02:47 AM
godofwarares godofwarares is offline
Webmaster
godofwarares's Avatar
Join Date: Dec 2006
Location: Florida
Posts: 552
godofwarares is on a distinguished road
Send a message via ICQ to godofwarares Send a message via AIM to godofwarares Send a message via MSN to godofwarares Send a message via Yahoo to godofwarares
Quote:
Originally Posted by Inverness View Post
Uh for GS1, setarray name,length; creates a blank array. Same in GS2 also.
And if you want to make array in GS1 you use setstring name,var0,var1,var2,var3,etc.;

Also your little bit of GS2 code is wrong.
PHP Code:
showtext(498,player.x-0.1,player.y-3,"Tempus Sans ITC","c",maparray[0]); 
That is correct.
Oy, I'm just a bit tired from a long day, Cut me some slack -_-
You don't need setarray in GS2, All you need to do is array = {whatever}. . .
I do that all the time.
__________________
What signature? I see no signature?
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 09:54 PM.


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