Pengui245 (2:36:59 PM): meh. EvilDeliverance (2:37:13 PM): i told you i was gonna be away all day Pengui245 (2:37:29 PM): yeh. EvilDeliverance (2:37:45 PM): maby i should make the server run as a service the same way the registry does EvilDeliverance (2:37:50 PM): then it could auto restart Pengui245 (2:37:58 PM): i found an example of a script that doesn't have any errors yet stops running in mid-script Pengui245 (2:38:09 PM): registry auto-restarts? EvilDeliverance (2:38:21 PM): if you check the run as a service box Pengui245 (2:38:35 PM): kk. EvilDeliverance (2:38:49 PM): i'm gonna bugtest your script real quick to find where the problem is EvilDeliverance (2:38:58 PM): server will probably crash a few times Pengui245 (2:39:12 PM): MAPSAY? EvilDeliverance (2:39:16 PM): i know EvilDeliverance (2:39:21 PM): but where in it Pengui245 (2:39:24 PM): i changed it to use a for loop instead of a while loop and it worked fine Pengui245 (2:39:34 PM): and SetWidth with smaller Widths works fine too EvilDeliverance (2:39:36 PM): so its infinite looping... Pengui245 (2:39:42 PM): it shouldn't. Pengui245 (2:39:55 PM): if it works the way it's written it shouldn't Pengui245 (2:40:06 PM): there's like a threshold where it starts infinite looping i think... EvilDeliverance (2:40:51 PM): no cause it crashes when your message is only onechar Pengui245 (2:41:01 PM): yeah, it doesn't crash with longer messages EvilDeliverance (2:41:38 PM): i bet theres a max str length.... Pengui245 (2:42:03 PM): but it works with a for loop for values of like 2000 EvilDeliverance (2:42:08 PM): hmm Pengui245 (2:42:35 PM): FUNCTION AlignLeft(Message as STRING, Width as LONG) as STRING Dim MessageWidth as LONG, i as LONG Dim Spaces as STRING MessageWidth = StrWidth(Message) MessageWidth = MessageWidth / 4 + MessageWidth % 4 / 2 For i = 1 To Width - MessageWidth Spaces = Spaces + " " Next i AlignLeft = Message + Spaces END FUNCTION Pengui245 (2:44:59 PM): CharWidth only works with capital letters, cause it thinks "a" == "A" Pengui245 (2:45:07 PM): well works with lowercase, but not correcly Pengui245 (2:45:33 PM): far as i can tell, there's no way to do case-sensitive comparisons EvilDeliverance (2:45:49 PM): the way your doing things is really damn inefficient Pengui245 (2:46:48 PM): O.o. EvilDeliverance (2:46:51 PM): you know how big a space is Pengui245 (2:47:02 PM): yep. EvilDeliverance (2:47:17 PM): therefore you know how much strwidth increases each time you add a space - you don't need to recalculate it each iteration... Pengui245 (2:47:28 PM): hence the new one with for loop Pengui245 (2:47:40 PM): renamed AlignLeft EvilDeliverance (2:47:50 PM): i'm just saying, thats why it crashed Pengui245 (2:47:56 PM): ? EvilDeliverance (2:48:08 PM): you probably overran the stacks EvilDeliverance (2:48:21 PM): err overflowed Pengui245 (2:48:25 PM): well they need a size adjustment EvilDeliverance (2:49:28 PM): hmm that or its a problem with mid Pengui245 (2:49:57 PM): i doubt it. EvilDeliverance (2:50:26 PM): i meant strmid - the mid function used by scritps EvilDeliverance (2:50:32 PM): checked though - its not Pengui245 (2:52:54 PM): uhh... Pengui245 (2:53:08 PM): lol.... Pengui245 (2:53:28 PM): when there're items on the ground, you can't see them in the map editor, but if you right-click on them they show up EvilDeliverance (2:55:03 PM): you get those messages? EvilDeliverance (2:55:15 PM): charwidth is causing the problem Pengui245 (2:55:19 PM): t Pengui245 (2:55:19 PM): test Pengui245 (2:55:23 PM): the problem is with strwidth Pengui245 (2:55:24 PM): those? EvilDeliverance (2:55:27 PM): yea EvilDeliverance (2:55:31 PM): i meant charwidth Pengui245 (2:55:34 PM): tell me abou tit. EvilDeliverance (2:55:48 PM): all i changed was this FUNCTION StrWidth(Str as STRING) as LONG Dim i as LONG StrWidth = 0 For i = 1 To Len(Str) StrWidth = StrWidth + 4'CharWidth(Mid(Str, i, 1)) Next i END FUNCTION EvilDeliverance (2:55:50 PM): and it works EvilDeliverance (2:57:02 PM): hmm EvilDeliverance (2:58:12 PM): whats the point of this script anyway? EvilDeliverance (2:58:36 PM): i mean i see what it does - but why Pengui245 (2:58:37 PM): cause i wanted to align text is all Pengui245 (2:58:41 PM): for tables! EvilDeliverance (2:59:26 PM): hmmm EvilDeliverance (2:59:29 PM): i wonder... EvilDeliverance (3:00:31 PM): interesting lol EvilDeliverance (3:00:51 PM): the chatbox is just a picture that gets moved up every time new text is added EvilDeliverance (3:01:09 PM): therefore it is possible to draw in there... Pengui245 (3:02:56 PM): or maybe the problem is not with charwidth but actually overflow Pengui245 (3:03:07 PM): caused by the extra load from carrying that function EvilDeliverance (3:03:29 PM): i'm gonna do some more testing Pengui245 (3:05:02 PM): here, try this for mind-messing fun: Pengui245 (3:05:32 PM): i put a script pengwy that outputs your inventory in lowercase using the align thing Pengui245 (3:05:40 PM): but it only does the first 16 items Pengui245 (3:06:17 PM): the first loop, For i = 0 To 5; if you change it to 2 To 5 it will output the rest of them Pengui245 (3:09:55 PM): so it should work perfectly fine yet it stops in mid-script Pengui245 (3:10:30 PM): uhhh Pengui245 (3:10:34 PM): was that me or you EvilDeliverance (3:10:54 PM): it diddn't crash Pengui245 (3:11:02 PM): .... Pengui245 (3:11:15 PM): i got kicked EvilDeliverance (3:11:22 PM): i see you as still in game Pengui245 (3:11:53 PM): i think it happens when you try to do stuff while still uploading a script EvilDeliverance (3:20:39 PM): so it seems huge string case statements halt the script Pengui245 (3:20:53 PM): -.- Pengui245 (3:21:13 PM): or maybe just huge anything in general EvilDeliverance (3:21:18 PM): i'll add asc - its needed and maby it will fix the problem Pengui245 (3:21:24 PM): yaaaaahahah Pengui245 (3:21:36 PM): you talking about pengwy Pengui245 (3:21:47 PM): pengwy doesn't halt if you take out the conversion to lowercase =P EvilDeliverance (3:22:17 PM): wha? Pengui245 (3:22:36 PM): scriptname pengwy Pengui245 (3:22:38 PM): /run pengwy Pengui245 (3:22:43 PM): outputs contents of inventory EvilDeliverance (3:23:11 PM): ok ok - lemme work on my damn script Pengui245 (3:23:22 PM): >.< EvilDeliverance (3:23:38 PM): also, i dont want any name specific scripts here - no need for scripts that run whenever someone types /god editscript etc Pengui245 (3:23:55 PM): oh yea verily Pengui245 (3:23:58 PM): that's a sign of corruption EvilDeliverance (3:24:26 PM): exactly - if you put scripts like that in, use getplayeraccess EvilDeliverance (3:24:38 PM): but i really dont see a need for them EvilDeliverance (3:58:34 PM): look at my script 'addmap' - the lines commented 'Problem are the ones causing an 'unknown error' EvilDeliverance (4:00:27 PM): check it out? Pengui245 (4:01:43 PM): maybe it's the having two dots in a row EvilDeliverance (4:02:20 PM): that shouldn't cause this type of thing though.. EvilDeliverance (4:02:41 PM): i mean, i'm pretty sure i have used types within types before.. Pengui245 (4:02:45 PM): well MBSC is funny Pengui245 (4:04:06 PM): is it just me or does DX client use a buttload more memory than old client Pengui245 (4:04:12 PM): 120K wtf. Pengui245 (4:04:24 PM): 140K* EvilDeliverance (4:04:29 PM): its the new layers EvilDeliverance (4:04:34 PM): it loads each tileset into mem EvilDeliverance (4:04:37 PM): hasto EvilDeliverance (4:05:28 PM): 140k is not even a meg... EvilDeliverance (4:05:33 PM): it should be a lot higher than that Pengui245 (4:05:42 PM): i meant. Pengui245 (4:05:46 PM): 140K K Pengui245 (4:05:48 PM): 140 Megs EvilDeliverance (4:06:03 PM): shouldn't be that high.. EvilDeliverance (4:06:12 PM): unless your using some huge tilesets Pengui245 (4:06:49 PM): grimmy tiles (2) is 21 MB, pengwy tiles 5 MB, default 3 MB EvilDeliverance (4:09:05 PM): hmm EvilDeliverance (4:09:22 PM): do me a favor and see if the mem increases over time EvilDeliverance (4:09:41 PM): its using 75k for me : / EvilDeliverance (4:09:46 PM): err 75 megs Pengui245 (4:12:27 PM): ... Pengui245 (4:12:31 PM): it loaded to 133K Pengui245 (4:12:46 PM): err 133 M Pengui245 (4:12:52 PM): stupid KMKMKMKMKMKMK EvilDeliverance (4:12:59 PM): is your mcache huge? EvilDeliverance (4:13:07 PM): kmkmkmkmk? EvilDeliverance (4:13:08 PM): ah that Pengui245 (4:13:32 PM): 15 M Pengui245 (4:14:27 PM): maps really appall me with how much space they waste Pengui245 (4:14:32 PM): so many redundant 000's EvilDeliverance (4:14:44 PM): how could they be more efficient? Pengui245 (4:14:59 PM): run-length encoding? EvilDeliverance (4:15:26 PM): that would add a ton more cpu strain Pengui245 (4:15:42 PM): EvilDeliverance (4:15:47 PM): 3k of network data is nothing EvilDeliverance (4:16:14 PM): processing through 3k of data would create a significant lag Pengui245 (4:16:48 PM): woah wtf. EvilDeliverance (4:16:58 PM): ? Pengui245 (4:17:07 PM): it said 5 MB EvilDeliverance (4:17:13 PM): what did? Pengui245 (4:17:25 PM): odyssey.bin mem usage EvilDeliverance (4:17:38 PM): only 5 megs?? Pengui245 (4:17:46 PM): for awhile anyway Pengui245 (4:17:55 PM): oh, yeah. EvilDeliverance (4:18:32 PM): also look at mapsay5000 Pengui245 (4:18:54 PM): want an SS? EvilDeliverance (4:19:05 PM): is this in game or before in game Pengui245 (4:19:12 PM): like, right now Pengui245 (4:19:17 PM): 7.3M EvilDeliverance (4:19:21 PM): you sure you only have one copy running? Pengui245 (4:19:21 PM): okay, 8.6M Pengui245 (4:19:30 PM): yep. EvilDeliverance (4:19:47 PM): odd - the tiles should take up quite a bit of space alone Pengui245 (4:20:00 PM): usually my first copy takes 130 M and a second one is like 100 M Pengui245 (4:20:31 PM): sooo freeaky EvilDeliverance (4:34:19 PM): shit i sent my last few messages to the wrong person lol EvilDeliverance (4:34:22 PM): Type MapGridMapType Dim MapNum AS LONG Dim Added AS LONG End Type Type MapGridType Dim Grid(250,250) AS MapGridMapType Dim Width AS LONG Dim Height AS LONG End Type Dim Map AS MapGridType FUNCTION Main(Player AS LONG, Message AS STRING) AS LONG if map.grid(2,2).mapnum > 0 then end if Main = Continue END FUNCTION EvilDeliverance: this crashed mbsc EvilDeliverance: i bet its the size of the grid EvilDeliverance: yeah.. EvilDeliverance: x=1 y=1 If Map.Grid(x,y).MapNum > 0 then cause an unknown error If Map.Grid(1,1).MapNum > 0 then does not EvilDeliverance (4:34:44 PM): the last thing is the problem Pengui245 (4:38:29 PM): huh. EvilDeliverance (4:38:41 PM): x=1 y=1 If Map.Grid(x,y).MapNum > 0 then cause an unknown error If Map.Grid(1,1).MapNum > 0 then does not EvilDeliverance (4:38:55 PM): using variables to refrence arrays Pengui245 (4:40:08 PM): i used variables to reference arrays in maze EvilDeliverance (4:41:44 PM): are they two dimmensional arrays? Pengui245 (4:41:56 PM): yep. Pengui245 (4:42:06 PM): Dim Cells(12, 12) as Cell EvilDeliverance (4:42:08 PM): look at the script test Pengui245 (4:43:02 PM): what teh heck. EvilDeliverance (4:43:06 PM): i know... EvilDeliverance (4:44:07 PM): check it out again - i simplified it a lot and same prob Pengui245 (4:44:45 PM): ?!?!?! Pengui245 (4:44:52 PM): problem just up and disappeared EvilDeliverance (4:44:55 PM): EvilDeliverance (4:44:57 PM): oh? Pengui245 (4:45:03 PM): oh wait. Pengui245 (4:45:04 PM): nvm. Pengui245 (4:45:10 PM): ' tend to have that effect. EvilDeliverance (4:45:14 PM): lol yea EvilDeliverance (4:48:04 PM): ok i got it as simple as possible EvilDeliverance (4:48:13 PM): still fucks up Pengui245 (4:50:09 PM): maze compiles Pengui245 (4:50:13 PM): Dim Cells(12, 12) as Cell Pengui245 (4:50:19 PM): For x = 0 To 11 For y = 0 To 11 Cells(x, y).SetVisited(0) For i = 0 To 3 Cells(x, y).Border(i) = 0 Cells(x, y).Walls(i) = 1 Next i Next y Next x EvilDeliverance (4:50:49 PM): whats the cell declaration look like? Pengui245 (4:50:53 PM): i must have had that problem too, cause all the accesses are done with Get and Set Pengui245 (4:51:01 PM): Type Cell Dim Border(4) as LONG Dim Walls(4) as LONG Dim Visited as LONG SUB SetBorder(Index as LONG, Value as LONG) Border(Index) = Value END SUB SUB SetWalls(Index as LONG, Value as LONG) Walls(Index) = Value END SUB SUB SetVisited(Value as LONG) Visited = Value END SUB FUNCTION GetBorder(Index as LONG) as LONG GetBorder = Border(Index) END FUNCTION FUNCTION GetWalls(Index as LONG) as LONG GetWalls = Walls(Index) END FUNCTION FUNCTION GetVisited() as LONG GetVisited = Visited END FUNCTION End Type EvilDeliverance (4:51:04 PM): ah Pengui245 (4:51:14 PM): check maze on your server EvilDeliverance (4:51:40 PM): FUCK i just realized, this might be more object oriented than we thought - maby we need to declare them as public..... EvilDeliverance (4:52:31 PM): nope : / EvilDeliverance (4:52:57 PM): wait,.. why does it work with the functions in mbsc Pengui245 (4:53:26 PM): ...? EvilDeliverance (4:53:39 PM): i mean the mbsc.inc types Pengui245 (4:53:47 PM): does it? Pengui245 (4:53:51 PM): i haven't really used them much Pengui245 (4:53:56 PM): and they're not precompiled Pengui245 (4:54:00 PM): right? EvilDeliverance (4:54:03 PM): right... EvilDeliverance (4:54:12 PM): the mbsc only compiles what it uses EvilDeliverance (4:54:40 PM): i still have bugaboo's email address - i'm gonna try to contact him through it Pengui245 (4:55:07 PM): >.< EvilDeliverance (5:15:20 PM): FUCK Sorry your message to justin_schumacher@yahoo.com cannot be delivered. This account has been disabled or discontinued [#102]. - mta181.mail.mud.yahoo.com Pengui245 (5:16:00 PM): gnargharg... EvilDeliverance (5:19:33 PM): you know operatoroverloading is in right? Pengui245 (5:20:09 PM): whaa???? EvilDeliverance (5:20:14 PM): add a Function OperatorEqual to your type and it overloads it Pengui245 (5:20:15 PM): it is?! EvilDeliverance (5:20:33 PM): also classes are in too EvilDeliverance (5:21:06 PM): Bugaboo2000 (1:36:15 AM): Class types are much more intense .. Bugaboo2000 (1:43:01 AM): Classes basically use pointers all the time.. and they keep track of their own lifetime .. and are dynamically allocated.. Bugaboo2000 (1:43:13 AM): When you do Dim A as MyType w/ a user defined type.. Bugaboo2000 (1:43:25 AM): It's setting asside enough bytes on the stack to hold that user defined type... Bugaboo2000 (1:43:39 AM): Dim A as MyClass .. then it just makes space for a 4 byte pointer.. Bugaboo2000 (1:43:42 AM): Then later you do: Bugaboo2000 (1:43:46 AM): Set A = New MyClass Bugaboo2000 (1:43:52 AM): And it assigns a new instance of your class to the pointer... Bugaboo2000 (1:43:58 AM): You can then toss it around... Bugaboo2000 (1:44:03 AM): Dim B as MyClass Bugaboo2000 (1:44:04 AM): Set B = A Bugaboo2000 (1:44:12 AM): Now they both point to the same thing .. Bugaboo2000 (1:44:44 AM): Once classes are done we'll play around .. they're a little slower than types, but very powerful. Bugaboo2000 (1:44:50 AM): And they can be returned from functions Pengui245 (5:21:44 PM): Bugaboo2000 (1:44:50 AM): And they can be returned from functions EvilDeliverance (5:21:48 PM): yea Pengui245 (5:21:49 PM): that is my favorite sentence Pengui245 (5:21:51 PM): out of all of them EvilDeliverance (5:21:58 PM): i know - i had completely forgotten about that Pengui245 (5:22:10 PM): so linked lists are doable? EvilDeliverance (5:22:32 PM): i suppose so lol EvilDeliverance (5:23:35 PM): EvilDeliverance (1:48:03 AM): how about function overloading - how difficult would it be to program that? Bugaboo2000 (1:48:17 AM): You mean operator overloading? Bugaboo2000 (1:48:37 AM): It's already in there.. Bugaboo2000 (1:48:41 AM): Class Point Bugaboo2000 (1:48:44 AM): Dim X as Long Bugaboo2000 (1:48:47 AM): Dim Y as Long Bugaboo2000 (1:48:57 AM): Function OperatorEqual(P as Point) as Long Bugaboo2000 (1:49:08 AM): OperatorEqual = (X = P.X AND Y = P.Y) Bugaboo2000 (1:49:10 AM): End Function Bugaboo2000 (1:49:11 AM): End Class Bugaboo2000 (1:49:13 AM): Sub Main() Bugaboo2000 (1:49:18 AM): Dim P1 as New Point Bugaboo2000 (1:49:21 AM): Dim P2 as New Point Bugaboo2000 (1:49:23 AM): P1.X = 5 Bugaboo2000 (1:49:26 AM): P1.Y = 10 Bugaboo2000 (1:49:29 AM): P2.X = 6 Bugaboo2000 (1:49:33 AM): P2.X = 10 Bugaboo2000 (1:49:36 AM): If P1 = P2 then Bugaboo2000 (1:49:39 AM): MsgBox("YAY") Bugaboo2000 (1:49:40 AM): End If Bugaboo2000 (1:50:01 AM): If you did that without defining OperatorEqual above, it would say it doesn't know how to do it.. Pengui245 (5:23:56 PM): when is this conversation? Pengui245 (5:23:57 PM): was* EvilDeliverance (5:24:30 PM): when types were first added Pengui245 (5:24:35 PM): Type Point Dim X as LONG Dim Y as LONG FUNCTION OperatorEqual(P as Point) as LONG OperatorEqual = X = P.X & Y = P.Y END FUNCTION End Type SUB Main(Player as LONG) Dim a as Point Dim b as Point a.x = 5 a.y = 7 b.x = 5 b.y = 7 PlayerMessage(Player, Str(a = b), Blue) END SUB Pengui245 (5:24:36 PM): it works. Pengui245 (5:25:52 PM): i like java. Pengui245 (5:26:46 PM): oh wow my code is almost the exact same as his Pengui245 (5:27:45 PM): but having classes means there are constructors Pengui245 (5:27:48 PM): what's the syntax for them Pengui245 (5:28:53 PM): but when i change Point to a class it won't let me pass it as a parameter, saying 'POINT' is not a valid type EvilDeliverance (5:28:57 PM): i know theres no copy constructor Pengui245 (5:28:58 PM): on this line FUNCTION OperatorEqual(P as Point) as LONG EvilDeliverance (5:28:58 PM): EvilDeliverance (1:47:41 AM): so to copy them you'd haveto script your own copy constructor Bugaboo2000 (1:47:46 AM): Yep... Bugaboo2000 (1:48:03 AM): And I don't have support for overloading the copy constructor yet.. EvilDeliverance (5:30:41 PM): hmm EvilDeliverance (5:41:25 PM): he hasn't been online since 9/29/2004 Pengui245 (5:46:59 PM): .......... EvilDeliverance (5:49:46 PM): so i have absolutely no way of contacting him Pengui245 (5:50:28 PM): .......................................................................... Pengui245 (5:53:41 PM): de·ism n. The belief, based solely on reason, in a God who created the universe and then abandoned it, assuming no control over life, exerting no influence on natural phenomena, and giving no supernatural revelation. EvilDeliverance (5:54:10 PM): interesting Pengui245 (5:54:36 PM): that was an unexpected reaction. EvilDeliverance (5:55:22 PM): i diddn't realize there was a religion that actually made sence EvilDeliverance (5:55:39 PM): or a religion that is even theoreticially possible EvilDeliverance (5:56:27 PM): unlikely but technicially possible Pengui245 (5:56:59 PM): so... classes.... how to define them EvilDeliverance (5:57:16 PM): i know as much as you do EvilDeliverance (5:57:31 PM): it would be nice if ody supported byref Pengui245 (5:58:12 PM): well i expect classes are passed by reference Pengui245 (5:58:15 PM): if only we can figure them out EvilDeliverance (5:58:19 PM): right EvilDeliverance (5:58:33 PM): i'd rather if he just made a pointer type Pengui245 (5:58:54 PM): scientology? EvilDeliverance (5:58:59 PM): ? Pengui245 (5:59:13 PM): it might be a religion. Pengui245 (5:59:25 PM): in the US it is legally one EvilDeliverance (5:59:27 PM): lol your going back and forth here... Pengui245 (5:59:55 PM): yeah, my brain is organized like a junk drawer EvilDeliverance (5:59:59 PM): one second your talking about classes passed by refrence, the next your talking about scientology..... EvilDeliverance (6:05:26 PM): For Y = Map.Width + 1 to 0 Mod -1 does this type of thing work in odyscript? Pengui245 (6:06:38 PM): uh, no.l Pengui245 (6:06:45 PM): use a while loop Pengui245 (6:07:05 PM): it's Step in VB i think