hello guys is there any way to check that if in the line at the end there is a question mark? like 8ball cmd has in #vu, n other thing, is there any way to check weather from bots? like !weather <city> i have seen most of the bots having this command, please tell me how? and another thing whenever i type /nick kokia it says : Services reserved nickname: Registered nickname.
help me
VUBot isn't made in Squirrel, so let's get that straight :)
A question mark can be checked by using if ( text.slice(-1) == "?" ).
A weather command is a bit more complex then that, since you'd need to get it from somewhere. In other words, you need to make a HTTP request using sockets, and then parse the response which is probably XML. There's about 1 example on this forum that explains the sockets, and you could check out the wiki (http://wiki.vc-mp.org/wiki/Scripting/Squirrel/Functions#Socket_Functions_.28In_the_.22Socket.22_plugin.29) for some explanation for the different functions.
The registered nickname means you probably send your password wrong too many times. You can fix this by using /ns recover Kokia <password>. After that you should be able to change back to your nick.
now the problem is when i type a question it says a question please when i dont enter question mark it gives answer.
in the wiki the socket thing is not finished, i cant find anything in example!!!!!
!
!
!
!
!
!
!
!
!
!
!
Like I said, search the forum (http://forum.vc-mp.org/?topic=1252.msg8390#msg8390).
Post your code, you probably reversed your if statements.