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 06-24-2006, 04:33 PM
JustBreathe JustBreathe is offline
Registered User
Join Date: Jun 2006
Posts: 59
JustBreathe is on a distinguished road
onRCChat param messed.

PHP Code:
/npc<commandparam

function onRCChatparam1param2 )
  {
  echo( 
"Param1:" SPC param1 );
  echo( 
"Param2:" SPC param2 );
  } 
PHP Code:
/npcstuff 1
Param1
stuff
Param2

Alright.

PHP Code:
/npcstuff 1 2
Param1
stuff,1 2
Param2

PHP Code:
/npcstuff "1 2"
Param1stuff
Param2
1 2 
PHP Code:
/npcstuff "1 2" "2 3"
Param1stuff,"1 2" "2 3"
Param2
Does the same with params[0] / params[1].

Problem: When you input a /npccommand without quotes on multiple words, everything is dumped in the first param. with quotes, the command is dumped in the first param, and the second one is what's in quotes.

In short: Spaces causes the npc command to be dumped completely inside the first param.
Reply With Quote
  #2  
Old 06-24-2006, 05:23 PM
calani calani is offline
Scriptess
calani's Avatar
Join Date: Aug 2003
Location: asmgarden.gmap
Posts: 606
calani is on a distinguished road
Send a message via AIM to calani
I was having a similar problem on Zodiac.
__________________
Reply With Quote
  #3  
Old 06-24-2006, 10:08 PM
xAndrewx xAndrewx is offline
Registered User
xAndrewx's Avatar
Join Date: Sep 2004
Posts: 5,260
xAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud of
Tokenize the first param to get the others. That's how we did it on Era.
__________________
Reply With Quote
  #4  
Old 06-26-2006, 08:24 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
Ok should be fixed now, I have also uploaded new versions of the npcservers to all machines, the servers just need to be restarted (and the "if (rc)" or "function onRC" been modified)
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 07:58 AM.


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