Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   New Scripting Engine (GS2) (https://forums.graalonline.com/forums/forumdisplay.php?f=153)
-   -   clientr arrays (https://forums.graalonline.com/forums/showthread.php?t=75960)

DustyPorViva 07-30-2007 10:49 PM

clientr arrays
 
1 Attachment(s)
My post is attached, sorry for the inconvenience, the forums keep giving me errors when I try to post stuff.

Horrified 07-31-2007 02:15 AM

player.chat=params is wrong i believe. try params=player.chat

DustyPorViva 07-31-2007 02:27 AM

That's just a debug line, so I could see what was being passed.
Anyways, I got it fixed, though I think it's a bug. I could not directly edit the clientr.items array, I had to make a temp.array to hold it, then edit it, and plug the info back into the clientr.items.
PHP Code:

  if (params[0]=="addquantity") {
    for (
i=0;i<clientr.items.size();i++) {
      if (
clientr.items[i][0]==params[1]) temp.itemindex=i;
    }
    
temp.items=clientr.items;
    
temp.items[temp.itemindex][1]=params[2];
    
clientr.items=temp.items;
  } 


killerogue 07-31-2007 03:14 AM

Quote:

Originally Posted by Horrified (Post 1335702)
player.chat=params is wrong i believe. try params=player.chat

I just couldn't believe my eyes.

Horrified 07-31-2007 04:18 AM

Quote:

Originally Posted by killerogue (Post 1335726)
I just couldn't believe my eyes.

Can you guys honestly stop being smartasses for 2 seconds to actually explain why it's not/is whatever is wrong? or must you act as if you know what you're doing, even though all of us already know?

And i guess my advice was wrong, then?

DustyPorViva 07-31-2007 04:21 AM

I explained it already. That line was simply for debugging, I used it to set my player's chat as the parameters being passed so I could know what information was being sent serverside. I don't see how I was anywhere near being a smartass, but meh.

Horrified 07-31-2007 04:27 AM

Quote:

Originally Posted by DustyPorViva (Post 1335740)
I explained it already. That line was simply for debugging, I used it to set my player's chat as the parameters being passed so I could know what information was being sent serverside. I don't see how I was anywhere near being a smartass, but meh.

Not you, people like killerogue who go and say "OH I CANT BELIEVE MY EYES" and leave it at that and do nothing but have it as a derogatory statement...

Codein 08-01-2007 01:06 AM

Do you know how to script, Horrified?

Crow 08-01-2007 01:08 AM

Quote:

Originally Posted by Codein (Post 1336055)
Do you know how to script, Horrified?

That's the point, kinda.
I don't want to sound rude, but if you don't know how to script, dont post here :/

cbk1994 08-01-2007 02:38 AM

Quote:

Originally Posted by killerogue (Post 1335726)
I just couldn't believe my eyes.

pwnt

killerogue 08-01-2007 04:12 AM

I wasn't trying to be a smartass. If Dusty needs my help he usually AIMs me anyhow. As he wasn't on AIM at the time (I don't thinl ;)) couldn't really give close up advice.

And yeah, you shouldn't give advice if you don't know what you're talking about.

zokemon 08-05-2007 11:22 AM

Yeah, if you don't know what every line in a script is doing, you should be prepared for people making such states towards you if you try to explain what's wrong. Not trying to persuade you from giving advice but rather you should learn more about GS2 first ;).

Inverness 08-12-2007 08:57 PM

Quote:

Originally Posted by zokemon (Post 1337558)
Yeah, if you don't know what every line in a script is doing, you should be prepared for people making such states towards you if you try to explain what's wrong. Not trying to persuade you from giving advice but rather you should learn more about GS2 first ;).

QUOTED FOR TRUTH

It was so extremely irritating to have the GST tell me how my script was wrong when they didn't understand jack-**** about what it was doing.

http://forums.graalonline.com/forums...t=73340&page=2

Anyhow...
PHP Code:

  if (params[0] == "addquantity") {
    for (
temp.0clientr.items.size(); ++) {
      if (
clientr.items[i][0] == params[1]) {
        
clientr.items[i][1] += params[2];
        break;
      }
    }
  } 

You shouldn't be using client flags for long strings of data unless you plan to never use the /open command on RC.


All times are GMT +2. The time now is 02:52 AM.

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