Need help with etecting which variable you type

xenaris

New Member
Reaction score
2
i just have an easy question, how, in GUI or JASS, can you detect what (in this case) integer you type?
e.g. -Circle 50
---> how does WE know that you typed "50" after -circle

well thats about it i think :D

any constructive criticism is welcome
 

quraji

zap
Reaction score
144
Shouldn't that be 9, not 8, so you have a space between the 'command' and the value i.e. -circle 50 as opposed to -circle50

Not in JASS. GUI uses a BJ which subtracts 1 from the source, so you count differently, but SubString starts from 0 - with 0 being the position before any characters (in this case, 0 is before the "-")

edit:
JASS:

function SubStringBJ takes string source, integer start, integer end returns string
    return SubString(source, start-1, end)
endfunction

native SubString takes string source, integer start, integer end returns string


Code:
 -Circle 50  
012345678
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top