Code problem

This forum is meant for requesting technical support or reporting bugs.

Moderators: time-killer-games, Vengeance66, Candle, reneuend, GM-Support

Code problem

Postby juhuwoorps » Sun May 20, 2012 6:35 am

Hello alltogether! :)

I have a problem with a vb code.

I try to giveout the numbers from 1 to 10 in a text message by using a for next loop:

Code: Select all
for i=1 to 10
Text(1)=text(1) & i
next


so far so good.

But if I try to give out the numbers except, for example the 3, I try this code:

Code: Select all
for i=1 to 10
If i=3 then
Next
End If
Text(1)=text(1) & i
next



I get an "unexpected next" error.

Is there any other solution to something like this?


Greetings Juhu
juhuwoorps
Code Master
 
Posts: 622
Joined: Tue Jul 08, 2008 3:13 pm

Postby lbq_bcn » Sun May 20, 2012 9:21 am

hello juhuwoorps

The code is incorrect.

I understand that in case i = 3 do not have to show text ...
One possible solution is this:



Code: Select all

for i=1 to 10
If i<>3 then
Text(1)=text(1) & i
End If
next



Try it.

Greetings!
User avatar
lbq_bcn
Member
 
Posts: 34
Joined: Tue May 15, 2012 10:50 pm
Location: Spain

Postby juhuwoorps » Sun May 20, 2012 9:56 am

Hello!

Thanks for your quick replay.

I know that my code is incorrect. :)

I don't have thought of this easy solution. Thank you.

I hope I can get it to work with my original code, that is more complex as the example I have given.
juhuwoorps
Code Master
 
Posts: 622
Joined: Tue Jul 08, 2008 3:13 pm

Postby insaneproject » Sun May 20, 2012 11:47 pm

lbq_bcn haber si tu pudieras ayudarme con un problema que no consigo solucionar y que me trae de cabeza y eso que aunque se ingles no lo entiendo como me gustaria,,, veras el problema es que tengo en un psiquiatrico 6 puertas y cuando consigues la primera y habres la misma arrastrando la llave, la llave la elimino del inventario, la cuestion es esta_

como puedo hacer para que al regresar a esta puerta ( que tiene un documento que te da una pista sobre un puzle que hay en otra habitacion) y ya sin su llave correspondiente pueda volver a habrirla sin necesidad de tener que repetir para cada puerta todas las imagenes de el psiquiatrico igual una orden de este tipo:

si llave negra arrastra la puerta se habre y cuando regresa la puerta siempre estara habierta

podrias ayudarme mi ingles no es demasiado fluido y aveces no comprendo bien las respuestas
Image
HERE MY WEBSITE AND MY GAMES! CLICK HERE:http://magva-productions.es.tl/
User avatar
insaneproject
Advanced Member
 
Posts: 193
Joined: Mon Apr 16, 2012 9:54 am
Location: SPAIN

Postby juhuwoorps » Mon May 21, 2012 1:17 am

@insaneproject

Please don't spam my thread with things that have nothing to do with it.

If you have questions make another topic or use the PM function from the board.

Thanks
juhuwoorps
Code Master
 
Posts: 622
Joined: Tue Jul 08, 2008 3:13 pm

Postby ShadowHunter » Mon May 21, 2012 10:48 am

Hi,

Please post only in English so all members can follow, reply and learn from your posts.

It doesn't matter if the writting is in perfect Oxford English or via a translater :wink:

With best regards,

ShAdOwHuNtEr
User avatar
ShadowHunter
Forum Admin and Games Page admin
 
Posts: 1304
Joined: Fri Jun 06, 2003 10:37 pm
Location: Belgium

Postby insaneproject » Mon May 21, 2012 12:37 pm

sorry, sorry you are right I apologize to all
Image
HERE MY WEBSITE AND MY GAMES! CLICK HERE:http://magva-productions.es.tl/
User avatar
insaneproject
Advanced Member
 
Posts: 193
Joined: Mon Apr 16, 2012 9:54 am
Location: SPAIN

Postby ShadowHunter » Mon May 21, 2012 1:20 pm

No problem :wink:
User avatar
ShadowHunter
Forum Admin and Games Page admin
 
Posts: 1304
Joined: Fri Jun 06, 2003 10:37 pm
Location: Belgium


Return to Adventure Maker Technical Support and Bug Reports

Who is online

Users browsing this forum: No registered users and 0 guests

cron