Graal Forums  

Go Back   Graal Forums > Graal V6 forums > Bug Report
FAQ Members List Calendar Today's Posts

 
 
Thread Tools Search this Thread Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 01-26-2009, 02:46 PM
cbk1994 cbk1994 is offline
the fake one
cbk1994's Avatar
Join Date: Mar 2003
Location: San Francisco
Posts: 10,718
cbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond repute
Send a message via AIM to cbk1994
Callstack Access

Making an item system, I have a function that looks like this:

PHP Code:
public function addItem(itemidquantity) {
  
// code here
  
temp.callstack getcallstack();
  echo(
"C:" SPC callstack[callstack.size() - 2].scriptcallobject SPC callstack.size());
  
// code here

The problem I'm having is that the callstack does not have an object for scripts that call it outside of a function block. For example, a weapon below:
PHP Code:
findPlayer("cbk1994").addItem(1001); 
Echos "C: 1" meaning that there is only one entry, which is the current object/function.

However, if this is used, it works perfectly:
PHP Code:
function onCreated() {
  
findPlayer("cbk1994").addItem(1001);

Echoes "C: -Guns 2" (-Guns being the name of the weapon)

This is, of course, serverside. It would be great if this could be fixed ASAP, or if someone knows a solution.

Thanks.
__________________
Reply With Quote
 


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:59 AM.


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