Yoko

All sides of Injection
It is currently 2026-01-25 16:03:39

All times are UTC+02:00




Post new topic  Reply to topic  [ 2 posts ] 
Author Message
 Post subject: goto string var
PostPosted: 2006-08-02 06:43:41 
Offline

Joined: 2006-08-02 06:17:59
Posts: 3
is it posssible make something like this work using str()?Cause im trying to do a kind of switch , but goMenu() is returning me a parse error.Thanks.

Code:

var b=1

  sub goMenu()

     goto 'A'+str(b)

  end sub

  sub menu()

 
   
       A1:
       uo.print(str(b))
       wait(2000)
       b=b+1
       goMenu()
     

       A2:
       uo.print(str(b))
       wait(2000)
       b=1
       goMenu()
     
end sub


Top
   
 Post subject:
PostPosted: 2006-08-02 14:33:35 
Offline
Junior Expert
User avatar

Joined: 2004-04-12 20:26:41
Posts: 150
Maybe some like this?
Code:
var b

sub main()
b=1
GoMenu(b)
end sub

sub GoMenu(b)
if b==1 then
     uo.print(str(b))
     b=b+1
end if
if b==2 then
     uo.print(str(b))
     b=1
end if
end sun


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 2 posts ] 

All times are UTC+02:00


Who is online

Users browsing this forum: No registered users and 4 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Limited