Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Server (https://forums.graalonline.com/forums/forumdisplay.php?f=14)
-   -   Showimg? (https://forums.graalonline.com/forums/showthread.php?t=25941)

Saga2001 03-19-2002 04:51 PM

Showimg?
 
Ok, heres the deal.
I have a thing that has to list some strings in images, now I used in the serverside with(getplayer(#a)) functionname(); and in functionname() i had showimgs which was after clientside. What am I doing wrong (I am not a bog p2p guy...)

cell424 03-19-2002 07:04 PM

Post your script, it would be much easier for me to fix.

screen_name 03-19-2002 09:32 PM

isnt with getplayer kinda like clientside, i mean it only works for that player, so dont worry about the //#CLIENTSIDE thing

am i right kai??

screen_name 03-19-2002 11:07 PM

Quote:

Originally posted by Kaimetsu


Hmm. Not really. It's still serverside, all the same commands are impossible. The only change is that when the with statement has been used, the NPC has something to talk about if it says "playerx=5;".

okay, gotcha

Saga2001 03-20-2002 09:41 AM

Well no, its like this:
its a database npc calling class blah...
NPC Code:

// Database npc:
if (created||initialized) {
showcharacter
join blah;
}
// class blah:
if (playerchats) {
tokenize #c;
if (strequals(#c,do #t(1) #t(2)))
with(getplayer(#a)) function();
}
//#CLIENTSIDE
function function() {
showimg blah;
}


Python523 03-20-2002 10:08 AM

I might be wrong but you might not be able to use with(getplayer(#a))
I think I heard that somewhere, it's probably wrong

Saga2001 03-20-2002 10:13 AM

Quote:

Originally posted by Python523
I might be wrong but you might not be able to use with(getplayer(#a))
I think I heard that somewhere, it's probably wrong

it has worked fine on other scripts...

Saga2001 03-20-2002 11:25 AM

Quote:

Originally posted by Kaimetsu


The code from the class gets inserted in exactly where the join statement is, so you'd actually want to put it outside of the created||initialized flag. Also, the serverside section is calling a function from the clientside section. This cannot be done, even if you do use getplayer(#a) (which, I might add, is perfectly valid if a little strange. If you have access to #a already then you don't need getplayer to get access to the player's other properties).

yes, i didn't think of that, that was after a while of despratly trying to get it to work that i added the with...how could i do this than?

SaijinGohan 03-20-2002 08:42 PM

=/. Now were getting into complicated matters.. x.x


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

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