25.08.2012, 22:40
I still use strcmp for one or two things, I wrote a CallLocalFunction based command system (that's how ZCMD works) for standard commands but I have some "dynamic" sort of commands that change during runtime, I couldn't figure out a way to incorporate public functions to do that so I just used a simple loop+strcmp (It loops about 50-60 times)
It's for teleports, so I have an array of coordinates and commands, you type for instance "/ls" it loops the array, checks each string and if it matches it teleports you to the right place.
Call me lazy, but I didn't really want to write (or write a function to write) 50-60 command functions for teleports!
As for files, just listen to everyone else, and don't offer scripting help if you have to ask about things like this!
It's for teleports, so I have an array of coordinates and commands, you type for instance "/ls" it loops the array, checks each string and if it matches it teleports you to the right place.
Call me lazy, but I didn't really want to write (or write a function to write) 50-60 command functions for teleports!
As for files, just listen to everyone else, and don't offer scripting help if you have to ask about things like this!