astgenator Posted July 13, 2009 Author Share Posted July 13, 2009 This Is My Code```' Executes when a player steps onto a scripted tile.Sub ScriptedTile(Index, Script) Select Case Script Case 0 Call PlayerMsg(Index, "This scripted tile has no apparent use.", WHITE) Exit Sub' Scripted Tile Town Case 1 If GetPlayerLevel(Index) < 20 Then TOWN_ID = Int(GetVar("Scripts\charextras\" & TownID & ".ini", "TOWN", "MAX_ID")) + 1 Call PlayerMsg(Index, "Thank You For Purchasing A Town", WHITE) Call PlayerMsg(Index, "Here Is 200 Town D0llars To Start.", WHITE) Call PutVar("Scripts\charextras\" & GetPlayerName(Index) & ".ini", "TOWN", "LEVEL", 1) Call PutVar("Scripts\charextras\" & GetPlayerName(Index) & ".ini", "TOWN", "ID", TOWN_ID) Call PutVar("Scripts\charextras\" & GetPlayerName(Index) & ".ini", "TOWN", "MONEY", 200) Call PutVar("Scripts\charextras\" & GetPlayerName(Index) & ".ini", "TOWN", "MAX_HOUSES", 1) Call PutVar("Scripts\charextras\" & GetPlayerName(Index) & ".ini", "TOWN", "MAX_SHOPS", 3) Call PutVar("Scripts\charextras\" & GetPlayerName(Index) & ".ini", "TOWN", "OWN", 1) Call PutVar("Scripts\charextras\" & GetPlayerName(Index) & ".ini", "TOWN", "SHOPS", 3) Call PutVar("Scripts\charextras\" & GetPlayerName(Index) & ".ini", "TOWN", "HOUSES", 1) Call PlayerMsg(Index, "Your Town ID is" & TOWN_ID), WHITE) Call PutVar("Scripts\charextras\" & TownID & ".ini", "TOWN", "MAX_ID", TOWN_ID) Exit Sub End If Case 2 ID = GetVar("Scripts\charextras\" & GetPlayerName(Index) & ".ini", "TOWN", "ID") If ID < 0 Then Call CustomMenuShow(Index, "Profile", "\GUI\CUSTOM\PlayerProfile.gif", 1) Call CustomMenuLabel(Index, 0, "Name: " & GetPlayerName(Index), 10, 95, 10, 0, 2, 400, 20) End If Exit Sub Case Else Call PlayerMsg(Index, "No tile script found. Please contact an admin to solve this problem.", WHITE) Exit Sub End SelectEnd Sub```Nothing Happens When I Set The Tile To The Script And Step On It. Is There Anything Wrong With My Script?And what is greater than "<" or ">" Link to comment Share on other sites More sharing options...
Bobosk Posted July 13, 2009 Share Posted July 13, 2009 Greater than is > because the alligator eats the bigger number(That's how i was taught!)```' Executes when a player steps onto a scripted tile.Sub ScriptedTile(Index, Script)Dim TOWN_IDDim ID Select Case Script Case 0 Call PlayerMsg(Index, "This scripted tile has no apparent use.", WHITE) Exit Sub' Scripted Tile Town Case 1 If GetPlayerLevel(Index) < 20 Then TOWN_ID = Int(GetVar("Scripts\charextras\" & TownID & ".ini", "TOWN", "MAX_ID")) + 1 Call PlayerMsg(Index, "Thank You For Purchasing A Town", WHITE) Call PlayerMsg(Index, "Here Is 200 Town D0llars To Start.", WHITE) Call PutVar("Scripts\charextras\" & GetPlayerName(Index) & ".ini", "TOWN", "LEVEL", 1) Call PutVar("Scripts\charextras\" & GetPlayerName(Index) & ".ini", "TOWN", "ID", TOWN_ID & "") Call PutVar("Scripts\charextras\" & GetPlayerName(Index) & ".ini", "TOWN", "MONEY", 200) Call PutVar("Scripts\charextras\" & GetPlayerName(Index) & ".ini", "TOWN", "MAX_HOUSES", 1) Call PutVar("Scripts\charextras\" & GetPlayerName(Index) & ".ini", "TOWN", "MAX_SHOPS", 3) Call PutVar("Scripts\charextras\" & GetPlayerName(Index) & ".ini", "TOWN", "OWN", 1) Call PutVar("Scripts\charextras\" & GetPlayerName(Index) & ".ini", "TOWN", "SHOPS", 3) Call PutVar("Scripts\charextras\" & GetPlayerName(Index) & ".ini", "TOWN", "HOUSES", 1) Call PlayerMsg(Index, "Your Town ID is" & TOWN_ID, WHITE) Call PutVar("Scripts\charextras\" & TownID & ".ini", "TOWN", "MAX_ID", TOWN_ID & "") Exit Sub End If Case 2 ID = GetVar("Scripts\charextras\" & GetPlayerName(Index) & ".ini", "TOWN", "ID") If ID < 0 Then Call CustomMenuShow(Index, "Profile", "\GUI\CUSTOM\PlayerProfile.gif", 1) Call CustomMenuLabel(Index, 0, "Name: " & GetPlayerName(Index), 10, 95, 10, 0, 2, 400, 20) End If Exit Sub Case Else Call PlayerMsg(Index, "No tile script found. Please contact an admin to solve this problem.", WHITE) Exit Sub End SelectEnd Sub```Few things i fixed.1) You didn't Dim "TOWN_ID"2) You didn't Dim "ID"3) You had "Call PlayerMsg(Index, "Your Town ID is" & TOWN_ID), WHITE)" While it needs to be "Call PlayerMsg(Index, "Your Town ID is" & TOWN_ID, WHITE)" Link to comment Share on other sites More sharing options...
astgenator Posted July 13, 2009 Author Share Posted July 13, 2009 thanks for the help, but my tiles still dont work.i put a "Scritped" Attribute and select #1\. Place it and step.and i just noticed my End If tags, where are they supposed to be Link to comment Share on other sites More sharing options...
xelander Posted July 13, 2009 Share Posted July 13, 2009 @Bobosk:> Greater than is > because the alligator eats the bigger number(That's how i was taught!)omg so did i!lol spam Link to comment Share on other sites More sharing options...
Vikola Posted July 19, 2009 Share Posted July 19, 2009 are your scripts turned on? lol Link to comment Share on other sites More sharing options...
Kimimaru Posted July 19, 2009 Share Posted July 19, 2009 Make sure you restart your server. If that doesn't work, close your server and then open it up again. Go to the Control Panel on the server and then click the button that turns scripts off. After that, turn the scripts back on, and then click the button that reloads the scripts. That should work if nothing is wrong with the code. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now