Graal Forums  

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

 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #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<command> param

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

PHP Code:
/npcstuff 1 2
Param1
: stuff,1 2
Param2
: 0 
PHP Code:
/npcstuff "1 2"
Param1: stuff
Param2
: 1 2 
PHP Code:
/npcstuff "1 2" "2 3"
Param1: stuff,"1 2" "2 3"
Param2: 0 
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
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 01:22 PM.


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