[Ohrrpgce] [Bug 84] Constants for gen()/general()

bugzilla-daemon at cyberverse.com bugzilla-daemon at cyberverse.com
Fri Jun 17 20:37:36 PDT 2005


http://HamsterRepublic.com/bugzilla/show_bug.cgi?id=84





------- Additional Comments From Bob at HamsterRepublic.com  2005-06-17 20:37 -------
Good start, but I see some likely bugs. For example

+SUB doloadgame (temp, map, foep, stat(), stock(), samemap)
+loadgame temp, map, foep, stat(), stock()
+afterload = -1

This "afterload" is an uninited global, so it will need to be passed on the
argument list after "samemap"

+IF gen(57) > 0 THEN
+ rsr = runscript(gen(57), nowscript + 1, -1, "loadgame")
+ IF rsr = 1 THEN

"rsr" is only used for this one IF block, so it is safe to do nothing special.
"nowscript" a super-global, defined in one of the .bi files, so nothing special
needs to be done for it either

+  '--pass save slot as argument
+  IF temp = 32 THEN temp = -1 'quickload slot
+  setScriptArg 0, temp
+ END IF
+END IF
+samemap = -1
+RETURN

And the "RETURN" is useless now that the "GOSUB" is gone.

+
+END SUB

The "END SUB" takes the place of the "RETURN"

Anyway, this is best tackled one sub at a time. Rather than doing a bunch all at
once, one should convert a single GOSUB/RETURN into a SUB and then compile,
watch for errors, then run and test the paricular feature it touches. (like
loading a game in this example)


-- 
Configure bugmail: http://HamsterRepublic.com/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.



More information about the Ohrrpgce mailing list