View Single Post
  #1  
Old 06-26-2006, 05:55 PM
excaliber7388 excaliber7388 is offline
Banned
excaliber7388's Avatar
Join Date: Jul 2005
Location: US
Posts: 5,229
excaliber7388 can only hope to improve
Send a message via AIM to excaliber7388
converting to gs2

So far, this is the only really annoying thing about gs2: Strings. More specifically, variables in string names. Of course, that might not be the problem here, who knows.
Anyway, this works in gs1, not gs2 I blame the strings, however I may have screwed something up when transfering it to gs2. The action IS received, and the parameter is read.
PHP Code:
if(params[0]=="buy")
  {
    if(
player.rupees>=("serverr.market_" params[1] @ "_price"))
    {
      
addweapon ("serverr.market_" params[1] @ "_item");
      
player.rupees-=("serverr.market_" params[1] @ "_price");
      
with(findplayer(("serverr.market_" params[1] @ "_acct")))
      {
        
player.rupees+=("serverr.market_" params[1] @ "_price");
        
player.chat="You sold something at the market!";
      }
    (
"serverr.market_" params[1] @ "_item")=0;
    (
"serverr.market_" params[1] @ "_acct")=0;
    (
"serverr.market_" params[1] @ "_img")=0;
    (
"serverr.market_" params[1] @ "_price")=0;
    }
  } 
Reply With Quote