Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   Tech Support (https://forums.graalonline.com/forums/forumdisplay.php?f=7)
-   -   Tiledefs not working on my PW? (https://forums.graalonline.com/forums/showthread.php?t=76702)

ShardIceFire 09-09-2007 07:40 AM

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?

PrinceOfKenshin 09-09-2007 08:32 AM

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_

ShardIceFire 09-09-2007 09:01 AM

Quote:

Originally Posted by PrinceOfKenshin (Post 1346741)
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.

Crow 09-09-2007 10:48 AM

Quote:

Originally Posted by PrinceOfKenshin (Post 1346741)
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

Admins 09-09-2007 11:30 AM

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.

Crow 09-09-2007 11:38 AM

Quote:

Originally Posted by Stefan (Post 1346748)
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.

Chompy 09-09-2007 03:18 PM

Quote:

Originally Posted by Crow (Post 1346749)
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

Crow 09-09-2007 04:50 PM

Quote:

Originally Posted by Chompy (Post 1346771)
removetiledefs(); itself without quotes cause an error in F2

Woah, I never noticed that ._.

ShardIceFire 09-09-2007 07:18 PM

Quote:

Originally Posted by Stefan (Post 1346748)
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.

zokemon 09-09-2007 07:36 PM

Quote:

Originally Posted by ShardIceFire (Post 1346827)
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.

ShardIceFire 09-09-2007 07:57 PM

Quote:

Originally Posted by zokemon (Post 1346833)
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 :(

zokemon 09-09-2007 08:07 PM

Make sure you always check your F2 log window for script errors. About the levels, your gserver just must be lagging or something.

ShardIceFire 09-09-2007 08:27 PM

Quote:

Originally Posted by zokemon (Post 1346840)
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.


All times are GMT +2. The time now is 07:41 PM.

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