Author Topic: Coding Help  (Read 1548 times)

0 Members and 1 Guest are viewing this topic.

DeathAdder

  • Orc Thrasher
  • ***
  • Posts: 137
  • Reputation: +0/-0
    • http://www.los.planetubh.com
Coding Help
« on: October 22, 2003 05:08 pm CDT »
Hey back with some new stuff. I've learned a lot lately and now i'm hitting a new problem... I can't reproduce the results of what the RPG game does and what i do in a seperate file. If you looked at the code for #getclientid command youll notice this
Code: [Select]
     if(%w1 == "#getclientid")
{
           if(%clientToServerAdminLevel >= 1)
           {
                 if(%cropped != -1)
                 {
               ------->%id = NEWgetClientByName(%cropped);<------

if(floor(%id.adminLevel) >= floor(%clientToServerAdminLevel) && Client::getName(%id) != %senderName)
Client::sendMessage(%TrueClientId, 0, "Could not process command: Target admin clearance level too high.");
else if(%id != -1)
                             Client::sendMessage(%TrueClientId, 0, %cropped @ " clientId is " @ %id @ ".");
                       else
                             Client::sendMessage(%TrueClientId, 0, "Invalid player name.");
                 }
                 else
                       Client::sendMessage(%TrueClientId, 0, "Please specify player name.");
           }
return;
     }
If you look at the thing inbetween the ------->  <--------- if you make the connections by the time you have this working
Code: [Select]
function test2()
{
%id = newgetclientbyname(BotsName);
say(0, "#global Target id is " @ %id @ ".");
}

you should have it say its id like 2048 is your own id... but i keep getting a -1 and when i do my own name rather than a bot i create i get my 2048... i don't understand. i need a way so i can grab a bot's id i create and use it in dfining a location for stuff i can already get the coordinates successfully just need that thing up there to work. Please help
« Last Edit: December 31, 1969 06:00 pm CST by DeathAdder »
<img src="http://www.pcrpg.org/pics/hosted/dadder.jpg">

Jonah

  • Uber Menace
  • *******
  • Posts: 1,662
  • Reputation: +0/-0
(No subject)
« Reply #1 on: October 22, 2003 05:28 pm CDT »
This should be in the Assistance part of the forums..
« Last Edit: December 31, 1969 06:00 pm CST by Jonah »


xRazorex: How big is an average 13 year old penis size?

UnderGod

  • Centurian Lord
  • ********
  • Posts: 2,691
  • Reputation: +0/-0
(No subject)
« Reply #2 on: October 22, 2003 06:16 pm CDT »
'BotsName' Either needs to be put into a variable or have quotes around it.

If you are using this for client-side, it isn't going to work. For server, I suggest not using a say() command.
« Last Edit: December 31, 1969 06:00 pm CST by UnderGod »
"The right man in the wrong place can make all the difference in the world"

DeathAdder

  • Orc Thrasher
  • ***
  • Posts: 137
  • Reputation: +0/-0
    • http://www.los.planetubh.com
(No subject)
« Reply #3 on: October 22, 2003 09:02 pm CDT »
Ya i thought i was in assistance sorry, and ya its client side, I looked it over and talked with LW and ya that won't work but i have another plan. i also need help with one more thing i'll post that in assistance though.
« Last Edit: December 31, 1969 06:00 pm CST by DeathAdder »
<img src="http://www.pcrpg.org/pics/hosted/dadder.jpg">