Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   Tech Support (https://forums.graalonline.com/forums/forumdisplay.php?f=7)
-   -   onRCChat param messed. (https://forums.graalonline.com/forums/showthread.php?t=66888)

JustBreathe 06-24-2006 04:33 PM

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.

calani 06-24-2006 05:23 PM

I was having a similar problem on Zodiac.

xAndrewx 06-24-2006 10:08 PM

Tokenize the first param to get the others. That's how we did it on Era.

Admins 06-26-2006 08:24 PM

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)


All times are GMT +2. The time now is 04:41 AM.

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