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
  #16  
Old 12-05-2002, 12:40 AM
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
I will update & restart the npcservers on that machine, it seems to be quite buggy (the weapons are not saved).
Reply With Quote
  #17  
Old 12-05-2002, 12:55 AM
Loriel Loriel is offline
Somewhat rusty
Loriel's Avatar
Join Date: Mar 2001
Posts: 5,059
Loriel is a name known to allLoriel is a name known to allLoriel is a name known to allLoriel is a name known to all
Quote:
Originally posted by Com013
NPC Code:

if (actionserverside) {
hatnum = strtofloat(#p(0));
putnpc2 playerx,playery+2,{join hats;};
with (npcs[npcscount-1]) {
this.hat = strtofloat(#I(clientr.hats,hatnum));
deletestring clientr.hats,hatnum; // <- always delets #0
callnpc -1,updategani;
}
}
//#CLIENTSIDE
if (weaponfired) triggeraction 0,0,serverside,DeleteTest,2;

He is not using classes there, Stefan...
Reply With Quote
  #18  
Old 12-05-2002, 03:23 AM
Com013 Com013 is offline
Registered User
Join Date: Aug 2002
Location: GMT+1
Posts: 381
Com013 is on a distinguished road
Quote:
Originally posted by Kaimetsu
Personally I just wouldn't use a string array, though it depends on how many of each hat you want to allow people to have. If you use ascii() and #K() then you can compact numbers over a fairly large range into a single byte, and then just use a normal string with one character per hat.
Sounds good. But lazy as I am, I'd like Stefan to fix the deletestring command.

Quote:
Originally posted by Stefan
Variables like hatnum are local, belonging to the current script, so you can use hatnum like you have written, and it works. You have problems when calling functions of joined classes, because those don't know of the local variables of the other script.
Yes, the classes I made are only accessing this.variables when they need data from the main script.
But here I am not calling a joined function. Here it looks like deletestring is always deleting number zero, no matter what I command it to delete.

I will test what happens when I enter a constant number to deletestring. Maybe it is just bugged when using variables. Though I doubt it.
__________________
Com013
Former Admin of the LAT on Graal The Adventure

e-mail: [email protected]
Reply With Quote
  #19  
Old 12-05-2002, 11:34 AM
Kaimetsu Kaimetsu is offline
Script Monkey
Kaimetsu's Avatar
Join Date: May 2001
Posts: 18,222
Kaimetsu will become famous soon enough
Quote:
Originally posted by Com013

But here I am not calling a joined function. Here it looks like deletestring is always deleting number zero, no matter what I command it to delete.
I'm pretty sure he knows that, he's just elaborating. Let's wait and see what happens after the update&restart
__________________
Reply With Quote
  #20  
Old 03-15-2003, 06:16 PM
Com013 Com013 is offline
Registered User
Join Date: Aug 2002
Location: GMT+1
Posts: 381
Com013 is on a distinguished road
*reviving the thread*

It's bugged again!!!
__________________
Com013
Former Admin of the LAT on Graal The Adventure

e-mail: [email protected]
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 02:04 PM.


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