Thread: join problems
View Single Post
  #1  
Old 01-11-2005, 12:19 AM
Slash-P2P Slash-P2P is offline
Banned
Join Date: May 2004
Location: Burning Blade
Posts: 941
Slash-P2P is on a distinguished road
join problems

I have some serverside local NPCs using a class on the server for house furniture where you can drag it with your mouse to move it. The dragging part is done, but I'm having a problem with 1 little thing...The join part. As of now, the local npcs set the string thiso.obj_archetype (also tried this.) to the type of furniture it is (bed, chair, etc...).

I don't think its possible to do join #s(string); But here's what I have now:
PHP Code:
if (created || initialized) {
  
// Object Archetypes
  
if (strequals(#s(thiso.obj_archetype),chair)) setimg amz_chair.png;
  
if (strequals(#s(thiso.obj_archetype),bed)) setimg element_bed1.png;
  
join ph_#s(thiso.obj_archetype);

Heres something else I tried...
PHP Code:
if (created || initialized) {
  
// Object Archetypes
  
if (strequals(#s(thiso.obj_archetype),chair)) {
    
setimg amz_chair.png;
    
join ph_chair;
  }
  if (
strequals(#s(thiso.obj_archetype),bed)) {
    
setimg element_bed1.png;
    
join ph_bed;
  }

That just makes it only join the bed script...

Can anyone help?
Reply With Quote