Graal Forums  

Go Back   Graal Forums > Development Forums > Tech Support
FAQ Members List Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 01-21-2006, 03:43 PM
hotrian hotrian is offline
Who?
Join Date: May 2003
Location: Eatonville, Washington, 98328
Posts: 56
hotrian is on a distinguished road
Send a message via AIM to hotrian Send a message via MSN to hotrian
Resolved: for (pl: allplayers) { Problem?

NPC Code:
	          new GuiPopUpMenuCtrl(H_AW_Selecter) {
profile = "DefaultMenuProfile";
x = 5;
y = 23;
width = 120;
height = 20;
text = "Account";
thiso.catchevent("H_AW_Selecter","onSelect","onSel ectaccount");
i=0;
for (pl: allplayers) {addtext(@pl,i);i++;}
}




Rc gives no errors and
when using that with my GUI, it lists 20 objects (See Attached Picture)
1 of which is a player (myself, im the only player on)
1 of which is the Npc server (thats not a player!)
and the other 18 are IRC channels T.T

But using
NPC Code:
for (i=0;i<=allplayerscounts;i++) {addtext(@players[i].account,i);}



Works just fine, only lists real players (just me at the time);

Server : Soakath
Weapon : H/Test

Sorry if this is a known bug
Am I just using it wrong?
Attached Images
File Type: bmp error.bmp (510.7 KB, 99 views)
__________________
Sometimes I wonder if I think too big.
Quote:
Originally Posted by Admins
I've moved the fox map to "levelstoobig/" because a terrain gmap of 1024x1024 levels is clearly too huge (the kingdoms main map is 40x40 and is already quite big). It was taking a lot of memory and was slowing down the computer.
Reply With Quote
  #2  
Old 01-21-2006, 04:22 PM
Admins Admins is offline
Graal Administration
Join Date: Jan 2000
Location: Admins
Posts: 11,693
Admins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud of
allplayers[] are all players, including virtual players (channels, chatters, players from other servers), basicly everything you see on the playerlist, you have flags like player.ischannel, player.isexternal

players[] is the list of players in the current level, which are max 1 map part away from you (on gmap)
Reply With Quote
  #3  
Old 01-22-2006, 12:00 AM
Lance Lance is offline
dark overlord
Lance's Avatar
Join Date: Sep 2003
Location: Space Jam Mountain
Posts: 5,072
Lance is on a distinguished road
Quote:
Originally Posted by hotrian
NPC Code:
for (i=0;i<=allplayerscounts;i++)



[...]
Am I just using it wrong?
You are using that wrong. It is 'allplayerscount', not 'allplayerscounts'.
Reply With Quote
  #4  
Old 01-22-2006, 03:51 PM
hotrian hotrian is offline
Who?
Join Date: May 2003
Location: Eatonville, Washington, 98328
Posts: 56
hotrian is on a distinguished road
Send a message via AIM to hotrian Send a message via MSN to hotrian
I typed that for here, on the server it says allplayerscount
Thats not what I was asking if I was using wrong, that part of the NPC works fine
I was talking about
i=0;
for (pl: allplayers) {addtext(@pl,i);i++;}
__________________
Sometimes I wonder if I think too big.
Quote:
Originally Posted by Admins
I've moved the fox map to "levelstoobig/" because a terrain gmap of 1024x1024 levels is clearly too huge (the kingdoms main map is 40x40 and is already quite big). It was taking a lot of memory and was slowing down the computer.
Reply With Quote
  #5  
Old 01-22-2006, 07:05 PM
Yen Yen is offline
Banned
Yen's Avatar
Join Date: Oct 2005
Location: Nova Scotia, Canada
Posts: 1,085
Yen is an unknown quantity at this point
Send a message via AIM to Yen Send a message via MSN to Yen
pl is predefined as the current player.
Change it to 'p' or something, I'm pretty sure that's the problem.
Reply With Quote
  #6  
Old 01-22-2006, 07:25 PM
Rick Rick is offline
PipBoy Extraordinaire!
Rick's Avatar
Join Date: Jul 2004
Location: Long Beach, California.
Posts: 831
Rick is on a distinguished road
Quote:
Originally Posted by Yen
pl is predefined as the current player.
Change it to 'p' or something, I'm pretty sure that's the problem.
No.
Reply With Quote
  #7  
Old 01-23-2006, 01:18 AM
Lance Lance is offline
dark overlord
Lance's Avatar
Join Date: Sep 2003
Location: Space Jam Mountain
Posts: 5,072
Lance is on a distinguished road
Quote:
Originally Posted by Yen
pl is predefined as the current player.
Change it to 'p' or something, I'm pretty sure that's the problem.
Stop posting bad advice.

If I have to warn you again, you are not going to like the outcome.
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 11:21 PM.


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