Graal Forums  

Go Back   Graal Forums > Development Forums > Tech Support
FAQ Members List Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 09-09-2007, 07:40 AM
ShardIceFire ShardIceFire is offline
Dancing Pony Privateer
Join Date: Sep 2007
Location: The Desert
Posts: 31
ShardIceFire is on a distinguished road
Send a message via AIM to ShardIceFire
Tiledefs not working on my PW?

I have a script as follows in a level on my playerworld:

PHP Code:
//#CLIENTSIDE
function onPlayerEnters() {
  
removetiledefs();
  
addtiledef("harpazo-tilestown.png","harp-isle",0);

The image is correctly set up and in the images folder, the levels start with harp-isle, but it just doesn't initialize. Someone told me I may need to reset the server for it to take effect. Is this true or is there an easier answer that I've somehow overlooked?
__________________
Reply With Quote
  #2  
Old 09-09-2007, 08:32 AM
PrinceOfKenshin PrinceOfKenshin is offline
That guy with a beard
PrinceOfKenshin's Avatar
Join Date: May 2004
Location: Ontario, Canada
Posts: 819
PrinceOfKenshin has a spectacular aura aboutPrinceOfKenshin has a spectacular aura about
You really dont need the "" for the level name. Also make sure tileset is 8-bit. Umm and the level name prefix would probably work better if you did harp-isle_
__________________


Quote:
Game Master (Server): Greetings PrinceOfKenshin, there are new posts on the forums that demand your urgent attention! God speed, the fate of the world is in your hands. If you fail, middle earth will forever be in the darkness and your children will be enslaved by McKain.
Reply With Quote
  #3  
Old 09-09-2007, 09:01 AM
ShardIceFire ShardIceFire is offline
Dancing Pony Privateer
Join Date: Sep 2007
Location: The Desert
Posts: 31
ShardIceFire is on a distinguished road
Send a message via AIM to ShardIceFire
Quote:
Originally Posted by PrinceOfKenshin View Post
You really dont need the "" for the level name. Also make sure tileset is 8-bit. Umm and the level name prefix would probably work better if you did harp-isle_
Did all of that, still nothing.
__________________
Reply With Quote
  #4  
Old 09-09-2007, 10:48 AM
Crow Crow is offline
ǝɔɐɹq ʎןɹnɔ
Crow's Avatar
Join Date: Dec 2006
Location: Germany
Posts: 5,153
Crow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond repute
Quote:
Originally Posted by PrinceOfKenshin View Post
You really dont need the "" for the level name. Also make sure tileset is 8-bit. Umm and the level name prefix would probably work better if you did harp-isle_
You do, it's a string...doesnt matter if its 'harp-isle' or 'harp-isle_' either. Also he said "on his playerworld". 8bit is not really needed. Try to set the level to the exact level name, or if that doesnt work, to nothing (just quotes "").
Name of the image also looks pretty weird, sure that isnt a typo? ;P
Reply With Quote
  #5  
Old 09-09-2007, 11:30 AM
Admins Admins is offline
Graal Administration
Join Date: Jan 2000
Location: Admins
Posts: 11,693
Admins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud of
In the script it was saying harp-isle- instead of "harp-isle", after fixing that it was working fine for me. The removetiledefs() function requires 1 argument though, call removetiledefs("") to remove the tile defintions for all levels.
You can watch logs/syntaxerrors.txt to see compiler errors for level npcs.
Reply With Quote
  #6  
Old 09-09-2007, 11:38 AM
Crow Crow is offline
ǝɔɐɹq ʎןɹnɔ
Crow's Avatar
Join Date: Dec 2006
Location: Germany
Posts: 5,153
Crow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond repute
Quote:
Originally Posted by Stefan View Post
In the script it was saying harp-isle- instead of "harp-isle", after fixing that it was working fine for me. The removetiledefs() function requires 1 argument though, call removetiledefs("") to remove the tile defintions for all levels.
You can watch logs/syntaxerrors.txt to see compiler errors for level npcs.
Mh, I always did removetiledefs() without any quotes...that may cause this one problem I have hehe.
Reply With Quote
  #7  
Old 09-09-2007, 03:18 PM
Chompy Chompy is offline
¯\(º_o)/¯
Chompy's Avatar
Join Date: Sep 2006
Location: Norway
Posts: 2,815
Chompy is just really niceChompy is just really niceChompy is just really nice
Send a message via MSN to Chompy
Quote:
Originally Posted by Crow View Post
Mh, I always did removetiledefs() without any quotes...that may cause this one problem I have hehe.
removetiledefs(); itself without quotes cause an error in F2
__________________
Reply With Quote
  #8  
Old 09-09-2007, 04:50 PM
Crow Crow is offline
ǝɔɐɹq ʎןɹnɔ
Crow's Avatar
Join Date: Dec 2006
Location: Germany
Posts: 5,153
Crow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond repute
Quote:
Originally Posted by Chompy View Post
removetiledefs(); itself without quotes cause an error in F2
Woah, I never noticed that ._.
Reply With Quote
  #9  
Old 09-09-2007, 07:18 PM
ShardIceFire ShardIceFire is offline
Dancing Pony Privateer
Join Date: Sep 2007
Location: The Desert
Posts: 31
ShardIceFire is on a distinguished road
Send a message via AIM to ShardIceFire
Quote:
Originally Posted by Stefan View Post
In the script it was saying harp-isle- instead of "harp-isle", after fixing that it was working fine for me. The removetiledefs() function requires 1 argument though, call removetiledefs("") to remove the tile defintions for all levels.
You can watch logs/syntaxerrors.txt to see compiler errors for level npcs.
That's weird, maybe fixing the removetiledefs was what did it. Because the way you reverted the addtiledef code is identical to how I had it in the first place, when it wasn't working. odd.
__________________
Reply With Quote
  #10  
Old 09-09-2007, 07:36 PM
zokemon zokemon is offline
That one guy...
zokemon's Avatar
Join Date: Mar 2001
Location: Sonoma County, California
Posts: 2,925
zokemon is a jewel in the roughzokemon is a jewel in the rough
Send a message via ICQ to zokemon Send a message via AIM to zokemon Send a message via MSN to zokemon Send a message via Yahoo to zokemon
Quote:
Originally Posted by ShardIceFire View Post
That's weird, maybe fixing the removetiledefs was what did it. Because the way you reverted the addtiledef code is identical to how I had it in the first place, when it wasn't working. odd.
Because it got a run-time error at the removetilefdefs and most likely ignored the next line.
__________________
Do it with a DON!
Reply With Quote
  #11  
Old 09-09-2007, 07:57 PM
ShardIceFire ShardIceFire is offline
Dancing Pony Privateer
Join Date: Sep 2007
Location: The Desert
Posts: 31
ShardIceFire is on a distinguished road
Send a message via AIM to ShardIceFire
Quote:
Originally Posted by zokemon View Post
Because it got a run-time error at the removetilefdefs and most likely ignored the next line.
possibly!

well now I have a ton of other problems to figure out I'm unsure how much of it is due to general bugginess, or my own error. I'm entirely unfamiliar with the GS2 system. When I save and upload new versions of levels, sometimes they don't show up updated for minutes or hours, or after multiple uploads.. even with updatelevel and everything.
Also, I can't get attachplayertoobj to work anymore, for the life of me
__________________
Reply With Quote
  #12  
Old 09-09-2007, 08:07 PM
zokemon zokemon is offline
That one guy...
zokemon's Avatar
Join Date: Mar 2001
Location: Sonoma County, California
Posts: 2,925
zokemon is a jewel in the roughzokemon is a jewel in the rough
Send a message via ICQ to zokemon Send a message via AIM to zokemon Send a message via MSN to zokemon Send a message via Yahoo to zokemon
Make sure you always check your F2 log window for script errors. About the levels, your gserver just must be lagging or something.
__________________
Do it with a DON!
Reply With Quote
  #13  
Old 09-09-2007, 08:27 PM
ShardIceFire ShardIceFire is offline
Dancing Pony Privateer
Join Date: Sep 2007
Location: The Desert
Posts: 31
ShardIceFire is on a distinguished road
Send a message via AIM to ShardIceFire
Quote:
Originally Posted by zokemon View Post
Make sure you always check your F2 log window for script errors. About the levels, your gserver just must be lagging or something.
Yeah I have been, no script errors. I'm guessing attachplayertoobj has to be clientside right? I looked but couldn't find any example codes using it with GS2, just GS1.
__________________
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 05:24 PM.


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