case insensitive variable names

Content and general development discussion, including quest scripts and server code. TMW Classic is a project comprising the Legacy tmwAthena server & the designated improved engine server based on evolHercules.


Forum rules

This forum houses many years of development, tracing back to some of the earliest posts that exist on the board.

Its current use is for the continued development of the server and game it has always served: TMW Classic.

Post Reply
User avatar
o11c
Grand Knight
Grand Knight
Posts: 2262
Joined: 20 Feb 2011, 21:09
Location: ^ ^

case insensitive variable names

Post by o11c »

The current version of the server uses variable names case insensitively. As this is senseless, I have removed this from the next server.

(Note also that at some point before release, I will force the scripter to explicitly declare all variable to detect typos - we've already had problems with this even with case insensitivity)

Anyway, here's a list of variables that might be used case-insensitively.

Some of them might be accidental - similar variable or label names used by different npcs - but even so, I recommend their case be normalized.

If any permanent variables are found, this may require admin assistance, depending on whether the variable can be set initially from multiple cases.

constants must match db/const.txt

Random note: the files are generated with the following script, then passed through sort -u | sort -f, which is *not* the same as sort -uf. Also there were some slight problems with numbers.

Code: Select all

#!/bin/sh
for ARG
do
cat $ARG |
sed 's/"\([^"]\|\\\"\)*"//g' |
sed 's_//.*__' |
sed -n '/{/,/}/p' |
sed 's/.*{//' |
sed 's/}.*//' |
grep -o '$\?@\?#\{0,2\}[A-Za-z_0-9]\+$\?' \
> out/$(echo $ARG | sed 's|/|_|g' | sed 's/txt$/var/')
done
Attachments
badcase.txt
(7.53 KiB) Downloaded 121 times
Former programmer for the TMWA server.
Post Reply