Omnimaga: The Coders Of Tomorrow
Welcome, Guest. Please login or register.
 
Omnimaga: The Coders Of Tomorrow
19 May, 2013, 11:17:59 *
Welcome, Guest. Please login or register.

Login with username, password and session length
 
   home   news downloads projects tutorials misc forums rules new posts irc about Login Register  
+-OmnomIRC

You must Register, be logged in and have at least 40 posts to use this shout-box! If it still doesn't show up afterward, it might be that OmnomIRC is disabled for your group or under maintenance.

Note: You can also use an IRC client like mIRC, X-Chat or Mibbit to connect to an EFnet server and #omnimaga.

Pages: [1]   Go Down
  Print  
Author Topic: string - duplicate symbol -  (Read 773 times) Bookmark and Share
0 Members and 1 Guest are viewing this topic.
p2
LV8 Addict (Next: 1000)
********
Offline Offline

Gender: Male
Last Login: 15 April, 2013, 20:40:16
Date Registered: 11 June, 2011, 15:55:36
Location: Germany
Posts: 810


Topic starter
Total Post Ratings: +39

View Profile
« on: 24 August, 2011, 15:49:49 »
0

I'm trying to write a "chat-program" for the TI, but I have a problem:
If I want to write something, I'll have to edit the string!
But how can I save something in a String if ther's alreadsy saved something in it?

1
2
:DelVar Str00
:"abc" -> Str00
Isn't working

but sometimes, I deed olly to add one letter to String00! How to do that???
It allways tells me DUPLICATE SYMBOL
« Last Edit: 24 August, 2011, 17:40:02 by p2 » Logged


FREEDOM
OF THE INTERNET
Spoiler for spoilers:
Spoiler for PICTURE:
Spoiler for userbars:



Spoiler for me:
Spoiler for Pic of me:
Spoiler for what I like:
MUSIC:
Dragonforce - Fury of the storm
Dragonforce - Through fire and flames
Skillet - Awake and alive
Skillet - Monster
Nelly - Just a dream
Linkin Park - No more Sorrow
Silbermond - An alle Krieger des Lichts
Wise Guys - Das bedeutet Krieg!
Wise Guys - Das war's wert!

GAMES:
Fancy Pants adventures - World 1
                                 - World 2
                                 - Sneak Peak
                                 - World 3 demo
Droid Assault
Age of Empires
Empire Earth

VIDEOS/FILMS:
StarGate SG1
StarTrek
TheAnnoyingOrange
V for Vendetta
War Games (1 + 2)

BOOKS:
Anthony Horowitz - Alex Rider 1: Stormbreaker
                        - Alex Rider 2: Skelleton Key
                        - Alex Rider 3: Point Blanc
                        - Alex Rider 4: Eagle Strike
                        - Alex Rider 5: Ark Angle
                        - Alex Rider 6: Scorpia
                        - Alex Rider 7: Crocodile tears
                        - Alex Rider 8: Scorpia Rising
Chris Archer - Alpha Kids 1
                 - Alpha Kids 2
                 - Alpha Kids 3
                 - Alpha Kids 4
                 - Alpha Kids 5
                 - Alpha Kids 6
                 - Alpha Kids 7
                 - Still don't have #8 Sad
                 - Alpha Kids 9
                 - Alpha Kids 10
Andreas Schlüter - Level 10 (every book)
Spoiler for Holy Necropost Batman:
Heiligen post-mortem Post, Schlägermann!
This is an example of how wonderful Google Translator works!
Spoiler for wise thing I stole from calc85maniac's profile:
"Most people ask, 'What does a thing do?' Hackers ask, 'What can I make it do?'" - Pablos Holman
JosJuice
LV9 Veteran (Next: 1337)
*********
Online Online

Last Login: Today at 11:05:14
Date Registered: 24 September, 2010, 16:46:12
Location: Sweden
Posts: 1300


Total Post Ratings: +51

View Profile
« Reply #1 on: 24 August, 2011, 15:59:59 »
+1

Str, Pic and GDB in Axe can only be set to a value when you're creating a program - you can't change the value of them while running the program. You'll need to use a free piece of RAM instead.
Logged

AngelFish
This is my custom title
Administrator
LV12 Extreme Poster (Next: 5000)
*
Offline Offline

Gender: Male
Last Login: Yesterday at 00:41:29
Date Registered: 15 August, 2010, 09:18:54
Posts: 3187


Total Post Ratings: +218

View Profile
« Reply #2 on: 24 August, 2011, 16:42:47 »
+1

I'm trying to write a "chat-program" for the TI, but I have a problem:
If I want to write something, I'll have to edit the string!
But how can I save something in a String if ther's alreadsy saved something in it?

1
2
:DelVar Str00
:"abc" -> Str00
Isn't working

but sometimes, I deed olly to add one letter to String00! How to do that???
It allways tells me DUPLICATE SYMBOL

You need to do something like

1
2
3
:Zeros(Str1,3)
:"abc"->Str1
To get that to work (Assuming you can store a string to memory in axe). Most Axe variables are *not* like TI-BASIC variables. They're created at compile time, which means that if you were to store more information to them than was originally placed there, you'd either corrupt RAM or overwrite part of your program.
Logged

∂²Ψ    -(2m(V(x)-E)Ψ
---  = -------------
∂x²        ℏ²Ψ
Deep Thought
So much to do, so much time, so little motivation
Administrator
LV13 Extreme Addict (Next: 9001)
*
Offline Offline

Gender: Male
Last Login: Today at 03:39:24
Date Registered: 19 May, 2009, 08:00:00
Location: The Universe
Posts: 7813


Total Post Ratings: +706

View Profile WWW
« Reply #3 on: 24 August, 2011, 16:50:06 »
+1


1
2
:Zeros(Str1,3)
:"abc"->Str1
That won't work either, because Zeros() already creates the static variable Str1 (three null bytes). Instead, do either this:

1
:Copy("abc",Str1,3)
or

1
2
3
:'a'→{Str1}
:'b'→{Str1}
:'c'→{Str1}
to put "abc" in a Str1 that already exists.
Logged




p2
LV8 Addict (Next: 1000)
********
Offline Offline

Gender: Male
Last Login: 15 April, 2013, 20:40:16
Date Registered: 11 June, 2011, 15:55:36
Location: Germany
Posts: 810


Topic starter
Total Post Ratings: +39

View Profile
« Reply #4 on: 24 August, 2011, 17:38:47 »
0

and when I want to add a single letter to a string?
How to do that?
« Last Edit: 24 August, 2011, 17:40:25 by p2 » Logged


FREEDOM
OF THE INTERNET
Spoiler for spoilers:
Spoiler for PICTURE:
Spoiler for userbars:



Spoiler for me:
Spoiler for Pic of me:
Spoiler for what I like:
MUSIC:
Dragonforce - Fury of the storm
Dragonforce - Through fire and flames
Skillet - Awake and alive
Skillet - Monster
Nelly - Just a dream
Linkin Park - No more Sorrow
Silbermond - An alle Krieger des Lichts
Wise Guys - Das bedeutet Krieg!
Wise Guys - Das war's wert!

GAMES:
Fancy Pants adventures - World 1
                                 - World 2
                                 - Sneak Peak
                                 - World 3 demo
Droid Assault
Age of Empires
Empire Earth

VIDEOS/FILMS:
StarGate SG1
StarTrek
TheAnnoyingOrange
V for Vendetta
War Games (1 + 2)

BOOKS:
Anthony Horowitz - Alex Rider 1: Stormbreaker
                        - Alex Rider 2: Skelleton Key
                        - Alex Rider 3: Point Blanc
                        - Alex Rider 4: Eagle Strike
                        - Alex Rider 5: Ark Angle
                        - Alex Rider 6: Scorpia
                        - Alex Rider 7: Crocodile tears
                        - Alex Rider 8: Scorpia Rising
Chris Archer - Alpha Kids 1
                 - Alpha Kids 2
                 - Alpha Kids 3
                 - Alpha Kids 4
                 - Alpha Kids 5
                 - Alpha Kids 6
                 - Alpha Kids 7
                 - Still don't have #8 Sad
                 - Alpha Kids 9
                 - Alpha Kids 10
Andreas Schlüter - Level 10 (every book)
Spoiler for Holy Necropost Batman:
Heiligen post-mortem Post, Schlägermann!
This is an example of how wonderful Google Translator works!
Spoiler for wise thing I stole from calc85maniac's profile:
"Most people ask, 'What does a thing do?' Hackers ask, 'What can I make it do?'" - Pablos Holman
Michael_Lee
LV9 Veteran (Next: 1337)
*********
Offline Offline

Gender: Male
Last Login: 09 August, 2012, 18:48:39
Date Registered: 05 August, 2010, 01:00:06
Posts: 1020

Total Post Ratings: +115

View Profile
« Reply #5 on: 24 August, 2011, 17:59:57 »
0

Try making the length of Str1 much larger then you need it to be -- I don't think it's easy to change the size of a constant after it's declared.

1
2
3
4
5
Zeros(50)->Str1

Copy("String 1",Str1,8)
Copy("The next string",Str1,15)

Alternatively, you could use either a buffer (like L1, L2, etc.) or an appvar.
This might not work/probably needs tweaking, but try something like:

1
2
3
4
5
6
Zeros(700)->L1
"Hello World!"->L1
Text(10,10,L1)
"Goodbye"[00]->L1
Text(10,20,L1)
(The [00] adds a null byte, just in case)

Also, I'm trying to remember -- if you compile as an app, can you rewrite program memory like Str1 or Pic02?

Edit:
Changed 'Zero(pointer,size)' to 'Zero(size)->pointer'
« Last Edit: 24 August, 2011, 18:24:56 by Michael_Lee » Logged

My website: Currently boring.

Projects:
Axe Interpreter
   > Core: Done
   > Memory: Need write code to add constants.
   > Graphics: Rewritten.  Needs to integrate sprites with constants.
   > IO: GetKey done.  Need to add mostly homescreen IO stuff.
Croquette:
   > Stomping bugs
   > Internet version: On hold until I can make my website less boring/broken.
Deep Thought
So much to do, so much time, so little motivation
Administrator
LV13 Extreme Addict (Next: 9001)
*
Offline Offline

Gender: Male
Last Login: Today at 03:39:24
Date Registered: 19 May, 2009, 08:00:00
Location: The Universe
Posts: 7813


Total Post Ratings: +706

View Profile WWW
« Reply #6 on: 24 August, 2011, 18:02:53 »
0

Also, I'm trying to remember -- if you compile as an app, can you rewrite program memory like Str1 or Pic02?
Nope, but you can always use safe RAM like L1.
Logged




Runer112
Anti-Riot Squad
LV10 31337 u53r (Next: 2000)
*
Offline Offline

Gender: Male
Last Login: Today at 07:50:48
Date Registered: 02 July, 2009, 06:38:05
Posts: 1679


Total Post Ratings: +492

View Profile
« Reply #7 on: 24 August, 2011, 18:07:13 »
0

I'm not sure why everyone has been using Zeros(pointer,size) in their code. This is not valid syntax. Zeros() only takes a single argument, and that is size. You want to use Zeros(size)→pointer instead.
Logged
Michael_Lee
LV9 Veteran (Next: 1337)
*********
Offline Offline

Gender: Male
Last Login: 09 August, 2012, 18:48:39
Date Registered: 05 August, 2010, 01:00:06
Posts: 1020

Total Post Ratings: +115

View Profile
« Reply #8 on: 24 August, 2011, 18:23:56 »
0

I'm not sure why everyone has been using Zeros(pointer,size) in their code. This is not valid syntax. Zeros() only takes a single argument, and that is size. You want to use Zeros(size)→pointer instead.

Erm, I was copying Deep Thought who (I suspect) was copying Qwerty.

>.>

*Michael hides
Logged

My website: Currently boring.

Projects:
Axe Interpreter
   > Core: Done
   > Memory: Need write code to add constants.
   > Graphics: Rewritten.  Needs to integrate sprites with constants.
   > IO: GetKey done.  Need to add mostly homescreen IO stuff.
Croquette:
   > Stomping bugs
   > Internet version: On hold until I can make my website less boring/broken.
yrinfish
LV4 Regular (Next: 200)
****
Offline Offline

Last Login: 13 May, 2013, 10:23:54
Date Registered: 11 March, 2011, 21:18:24
Location: 0x3F62B5E0
Posts: 138


Total Post Ratings: +5

View Profile WWW
« Reply #9 on: 24 August, 2011, 19:44:31 »
+1

Two things, first @DT:

1
2
3
:'a'→{Str1}
:'b'→{Str1}
:'c'→{Str1}
to put "abc" in a Str1 that already exists.

That should be:

1
2
3
:'a'→{Str1}
:'b'→{Str1+1}
:'c'→{Str1+2}

otherwise the first char would be overwritten with a, then b and finally c...

second, to add only one, do this:

1
:'a'→{Str1+<offset>}
Logged

I need help with Random (x86 Happy), pm me if you want to help Cheesy
LOOK IN MY SPOILER, MY SIG IS UPDATED (almost) EVERY DAY
Spoiler for MiniTale:
No mini competition please, teamwork is better Cheesy
I suggest we do not use "MiniCraft" as the name:
Notch has asked us to not do that.
It will get changed to "MiniTale"
@Hayleia, you don't _have to_ organize Tongue
THIS POST IS IN MY SIG TOO

Details
Language: Axe
Platform: TI 83+

Things we'll need to do/make
Draw the sprites saintrunner is working on this
A save file format.
A level generator.
A Tilemapper.
Some sort of AI.
Crafting system.

People on it (AFAIK)
annoyingcalc
saintrunner
Hayleia (your avatar is really cool btw)
epic7
Blue Raven
yrinfish

Useful info
For those who are going to work on this
General Program Structure
Spoiler for Hidden:

:.Sprite Data
:.Other Data
:
:.Main menu
:.Option Start Game->init
:.Option How To Play->help
:.Option About->crdt
:
:.BEGIN init
:.Save file is present?
:.yes->strt
:.no->lgen
:.END init
:
:.BEGIN lgen
:.Make appvar appvMCSAVE
:.create 7 levels
:.edit for sky, mines, deep mines, nether
:.END lgen
:
:.BEGIN strt

~~~~ working on this ~~~~

Tiles
Spoiler for Hidden:
Wheat
Water
Tree
Stone
Stairs
Sapling
Sand
Rock
Ore
Lava
InfiniteFall
Hole
HardRock
Grass
Flower
Farm
Dirt
Cloud
CloudCactus
Cactus

Biomes
Spoiler for Hidden:
--Sky
Cloud
--Surface
Forest
Meadow
Plains
Cliffs
Mountain
Desert
Ocean
--Underground
Mines
Deep Mines
Nether

Items
Spoiler for Hidden:
--Tools
Pick
Axe
Hoe
Shovel
--Weapon
Sword
--Utilities
Pow Glove
Workbench
Furnace
Lantern
Anvil
Oven
Chest
--Resources
Apple
Bread
Cloth
Slime
Wood
Seeds
Wheat
Acorn
Cactus
Flower
Cloud
Dirt
Stone
Sand
Coal
Iron Ore
Gold Ore
Gem
Glass
Iron
Gold
Spoiler for More...:
Spoiler for About me:

No, I didn't lie!!


quotes:HERE

And even more:


[07:53:14] <+Frey> Y'know, when people descend from my heavens , they're never Chuck Norris
[07:53:55] <+Frey> I usually get another catgirl or an angel pops down for a visit
[07:54:06] <+Frey> Some angels are really nice
[07:54:33] <+Frey> Some are into the whole "scare the locals" bit
[07:54:54] <+Frey> And some just absent minded
[07:55:38] * +david_ has nothing to do
[07:55:40] <+Frey> It's the absentminded ones you gotta look out for, because the'yre the ones that forget they're 40ft tall
[07:56:04] <+Frey> They're also the ones that forget about social taboos, like nudity
[07:56:28] <+Frey> Have you ever tryed to explain to an angel...anything?
[07:56:45] <+Frey> They don't listenunless they want to
[07:57:16] <+Frey> And don't learn unless they think they don't know
[07:57:51] <+Frey> Except for the nice ones, they're nice
[07:59:27] <+OmnomIRC> (O)<yrinfish> lol
[07:59:32] <+Frey> And they're all so pretty!
[07:59:38] <+Frey> It's ridiculous
[07:59:44] <+OmnomIRC> (O)<yrinfish> I hate PUSHES, THEY HAUNT ME
[08:00:06] <+Frey> Want an angel to come over and exorcise them?
[08:00:36] <+OmnomIRC> (O)<yrinfish> or, more specific: the fact that sometimes, happy outputs: pushes != pops
[08:00:47] <+OmnomIRC> (O)<yrinfish> I know why
[08:01:01] <+OmnomIRC> (O)<yrinfish> and I can solve it by adding a lookahead
[08:01:10] <+OmnomIRC> (O)<yrinfish> But I don't want to
[08:01:24] <+OmnomIRC> (O)<yrinfish> but continue your story
[08:01:35] <+OmnomIRC> (O)<yrinfish> lol
[08:03:13] <+Frey> Ok, so one day, I was walking to the school bus, and, long story short, got my life saved by an angel
[08:03:27] <+Frey> This one was a scary one
[08:03:42] <+Frey> Same height/age as me
[08:04:14] <+Frey> OMG She was the scariest person I had ever met
[08:04:28] <+Frey> She made the entire football team pee their pants
[08:04:43] <+Frey> I was so glad she was on my side
[08:05:04] <+Frey> Right up until she tryed to enter the bathroom with me
[08:05:37] <+OmnomIRC> (O)<yrinfish> lool
[08:05:45] <+Frey> After a muchness of arguing, I finally got through to her
[08:05:56] <+Patrick-D> is this a rap song?
[08:06:06] <+OmnomIRC> (O)<aeTIos> idk
[08:06:09] <+Frey> She tap danced outside my stall the entire time, though
[08:10:04] <+Frey> She was in all my classes too, which was weird, especially as they were all advanced courses and she joined in the middle of the semester
[08:10:28] <+Frey> Even the teachers were scared of her
[08:10:45] <+Frey> Note that she was gorgeous
[08:12:09] <+Frey> So, this angel and I, we managed to stop the apocalypse
[08:12:48] <+Frey> And she kissed me before going back,
[08:13:08] <+Frey> To heaven, but as it turns out that kiss sealed her to Earth
[08:13:47] <+Frey> We still don't know what to do


lol:

[11:30:53] <DThought> <OmnomIRC> (O)<yrinfish> 2 guests are looking at my topic
[11:30:53] <DThought> <OmnomIRC> (O)<yrinfish> I wonder who they are
[11:30:53] <DThought> <OmnomIRC> (O)<yrinfish> where they live
[11:30:53] <DThought> <OmnomIRC> (O)<yrinfish> how old they are
[11:30:55] <DThought> <OmnomIRC> (O)<yrinfish> What kind of jokes they make
[11:30:57] <DThought> <OmnomIRC> (O)<yrinfish> but it surprises me that theyre looking at my topic
[11:31:01] * DThought smacks yrinfish for stalking
[11:31:08] <yrinfish> lool
[11:31:14] <DThought> Whoa, why'd it include all the newlines?
[11:31:23] * calc84maniac  smacks DThought for talking
[11:31:28] * calc84maniac  runs

Crisps:

<OmnomIRC> (O)* Keoni29  Eating crisps
<OmnomIRC> (O)* yrinfish  asks keoni some
<OmnomIRC> (O)<Keoni29> 7$ shipping please
<OmnomIRC> (O)* yrinfish  gives
<OmnomIRC> (O)<Keoni29> It will arrive in 3 days
<OmnomIRC> (O)<yrinfish> Thank you
<OmnomIRC> (O)* Keoni29  Wonders if he wants some dip
<OmnomIRC> (O)<yrinfish> chili please
<OmnomIRC> (O)<Qwerty.55> Adobe, last time I updated one of your products, the changes broke half of the documents using it.
<OmnomIRC> (O)<Keoni29> Sad
<OmnomIRC> (O)<Qwerty.55> Why the hell would I update anything else from you?
<OmnomIRC> (O)* yrinfish  kicks adobe
<OmnomIRC> (O)* yrinfish  runs
<OmnomIRC> (O)* Qwerty.55  runs with him
<OmnomIRC> (O)<Keoni29> I have guacamole :S
<OmnomIRC> (O)<Keoni29> I have guacamole :S
<OmnomIRC> (O)* yrinfish  likes that too
<OmnomIRC> (O)* Keoni29  yay
<OmnomIRC> (O)* yrinfish
<OmnomIRC> (O)<Keoni29> http://www.tinyurl.com/guacamole.jar
<OmnomIRC> (O)<Keoni29> :3
<OmnomIRC> (O)<yrinfish> 404
<OmnomIRC> (O)<yrinfish> no foooooooooooooooooooooooouwaaaaaaaaaaaaaaaaahnd
<OmnomIRC> (O)<Keoni29> <3 no shit
<OmnomIRC> (O)<Keoni29> You cant download jars of guacamole
<OmnomIRC> (O)<Keoni29> I have an idea!
<OmnomIRC> (O)<yrinfish> loool
<yrinfish> that came too late Wink
<OmnomIRC> (O)<Qwerty.55> Actually, I just realized why Adobe's update breaks everything.
<yrinfish> tell me
<yrinfish> again too late
<OmnomIRC> (O)<Keoni29> Buy yourself some :3
<yrinfish> that was to keoni
<yrinfish> lOLoL
<yrinfish> Cheesy
<OmnomIRC> (O)<Qwerty.55> It's a security update and if you can't run anything, you obviously can't get infected by anything in those documents.
<OmnomIRC> (O)<Keoni29> Then I pay one dip
<OmnomIRC> (O)<Keoni29> Do you have paypal?
<OmnomIRC> (O)<Keoni29> :S
<OmnomIRC> (O)<yrinfish> nope
<OmnomIRC> (O)<yrinfish> lol
<OmnomIRC> (O)<yrinfish> hm, I could get some crisps
<OmnomIRC> (O)<yrinfish> it is too late to do that here
<OmnomIRC> (O)<yrinfish> main europe
* jkag ([email protected]) has joined #omnimaga
* Netbot45 gives voice to jkag
<OmnomIRC> (O)<yrinfish> MUSIC YAY
<OmnomIRC> (O)<Keoni29> Well the shops are closed here too
<OmnomIRC> (O)<Keoni29> 21:45
<OmnomIRC> (O)<yrinfish> where?
<OmnomIRC> (O)<Keoni29> Gwt+0
<OmnomIRC> (O)<Keoni29> The netherlands
<OmnomIRC> (O)<yrinfish> huh? loool
<OmnomIRC> (O)<yrinfish> hallo keoni, hoe gaat het? continue in english please
<OmnomIRC> (O)<Keoni29> :S
<OmnomIRC> (O)<yrinfish> really stupid dutch sentence^

Languages:
1308401677 <yrinfish> I'm dutch
1308401679 <yrinfish> lol
1308401687 <p2> Oh.
1308401702 <yrinfish> So I need to learn german
1308401705 <yrinfish> and french
1308401712 <yrinfish> and English
1308401717 <yrinfish> and Dutch
1308401724 <yrinfish> and Greek
1308401728 <yrinfish> and Latin
1308401739 <p2> I must learn french and English.
1308401739 <yrinfish> and Spanish
1308401749 <Spyro543> Y=sin(x+yrinfish)*>9000
NOTE: these are all the languages I have chosen to learn!
Spoiler for Info:

Spoiler for Projects:
Happy    [.---------] A C-like programming language for the z80 in js. REWRITING THE WHOLE THING, GOOD IDEAS NEEDED
DionJump [======----] Paused, but there is an update
Corona   [----------] Not enough time... If you need inspiration?
LGETC    [======----] getchar() LUT, useful and not too big. Waits for keyboard input and returns ASCII char

Spoiler for yrinthings tools:
stringLength Get the length in pixels of a small-font string.
safeText Html-ify a piece of text.
AngelFish
This is my custom title
Administrator
LV12 Extreme Poster (Next: 5000)
*
Offline Offline

Gender: Male
Last Login: Yesterday at 00:41:29
Date Registered: 15 August, 2010, 09:18:54
Posts: 3187


Total Post Ratings: +218

View Profile
« Reply #10 on: 24 August, 2011, 19:53:04 »
0

I'm not sure why everyone has been using Zeros(pointer,size) in their code. This is not valid syntax. Zeros() only takes a single argument, and that is size. You want to use Zeros(size)→pointer instead.
* Qwerty.55 is launching a covert campaign to get Quigibo to change the syntax...
Logged

∂²Ψ    -(2m(V(x)-E)Ψ
---  = -------------
∂x²        ℏ²Ψ
Deep Thought
So much to do, so much time, so little motivation
Administrator
LV13 Extreme Addict (Next: 9001)
*
Offline Offline

Gender: Male
Last Login: Today at 03:39:24
Date Registered: 19 May, 2009, 08:00:00
Location: The Universe
Posts: 7813


Total Post Ratings: +706

View Profile WWW
« Reply #11 on: 24 August, 2011, 21:23:26 »
0

I'm not sure why everyone has been using Zeros(pointer,size) in their code. This is not valid syntax. Zeros() only takes a single argument, and that is size. You want to use Zeros(size)→pointer instead.
Copied from Qwerty. Wasn't thinking.
That should be:

1
2
3
:'a'→{Str1}
:'b'→{Str1+1}
:'c'→{Str1+2}
Again, wasn't thinking x.x
Logged




p2
LV8 Addict (Next: 1000)
********
Offline Offline

Gender: Male
Last Login: 15 April, 2013, 20:40:16
Date Registered: 11 June, 2011, 15:55:36
Location: Germany
Posts: 810


Topic starter
Total Post Ratings: +39

View Profile
« Reply #12 on: 25 August, 2011, 14:55:29 »
0

so that should be possible: Huh?

1
:{Str1+X}→{Str2+(lenth(Str1)+1)}


I've used a String (Str60) for the Free spaces - To delete a string I now use

1
:Copy(Str60,[i]Str2[/i],90)
(90 because str60=90 spaces)





this is my newest code:
(You must read it to understand the program - No (english) description in it!!)
Spoiler for code:
:.CHAT
:"                                                                                "→Str60
:det(500)→Str1
:det(500)→Str2
:5→B
:"person:"→Str80
:"p1 = [1]"→Str81
:"p2 = [2]"→Str82
:Output(1,1,Str80
:Output(2,1,Str81
:Output(3,1,Str82
:Repeat B=1
: If getKey(34)
:  1→X
:  1→B
:  Goto 1
: End
: If getKey(26)
:  2→X
:  1→B
: End
:End
:
:
:Lbl 1
:
:
:1→A
:ClrDraw
:DispGraph
:
:
:
:
:
:
:
:
:
:
:
:Repeat getKey(15)
:
:
:
:
:
:
:
:.EMPFANGEN/
:
:Get(→Ans
:If Ans≠(0-1)
: Vertical -
: Vertical -
: Vertical -
: Vertical -
: Vertical -
: Vertical -
: Vertical -
:
:
: Text(0,40,Ans
: If X=1
:  conj(Str60,Str2,90)
: End
: If X=2
:  conj(Str60,Str1,90)
: End
:End
:
:./EMPFANGEN
:
:
:
:
:
:
:.SENDEN/
:
:If getKey(9)
: If X=1
:  Repeat Send(Str1,2000)≠(0-1)
:  End
:  Vertical -
:  Vertical -
:  Vertical -
:  Vertical -
:  Vertical -
:  Vertical -
:  Vertical -
:  Text(0,40,Str1
:  conj(Str60,Str1,90)
: End
: If X=2
:  Repeat Send(Str2,2000)≠(0-1)
:  Vertical -
:  Vertical -
:  Vertical -
:  Vertical -
:  Vertical -
:  Vertical -
:  Vertical -
:  Text(0,40,Str2
:  conj(Str60,Str2,90)
: End
:End
:
:./SENDEN
:
:
:
:
:
:
:.FENSTER/
:
:For(P,0,95
: For(Q,5,63
:  Pxl-Off(P,Q
: End
:End
:If getKey(1)
: Vertical -
:End
:If getKey(2)
: Horizontal +
:End
:If getKey(3)
: Horizontal -
:End
:If getKey(4)
:Vertical +
:End
:If getKey(1)=getKey(2)=getKey(3)=getKey(4)=1
: ClrDraw
: If X=1
:  Text(0,50,Str1
: End
: If X=2
:  Text(0,50,Str2
: End
:End
:If X=1
: Text(0,50,Str1
:End
:If X=2
: Text(0,50,Str2
:End
:
:./FENSTER
:
:
:
:
:
:
:.DEL/
:
:If getKey(56)
: If X=1
:  conj(Str60,Str1,90)
: End
: If X=2
:  conj(Str60,Str2,90)
: End
:End
:
:./DEL
:
:
:
:
:
:
:.MODUS/
:
:If getKey(55)
: A+1→A
: If A=4
:  1→A
: End
:End
:If A=1
: conj("         'WRMH  ?θVQLG  :ZUPKFC  YTOJEB  XSNIDA         ",Str99,56)
:End
:If X=2
: conj("         'wrmh  ?θvqlg  :zupkfc  ytojeb  xsnida         ",Str99,56)
:End
:If X=3
: conj("         +-*/^  ‾369)}  .258(K  0147,       2-1          ",Str99,56)
:End
:
:./MODUS
:
:
:
:
:
:
:.SCHREIBEN/
:
:For(Z,10,56
: If getKey(Z)
:  If X=1
:   conj({Str99+Z},Str1,length(Str1)+1)
:   Text(0,50,Str1
:  End
:  If X=2
:   conj({Str99+Z},Str2,length(Str2)+1)
:   Text(0,50,Str2
:  End
: End
:End
:
:./SCHREIBEN
:
:
:
:
:
:
:.ZEIGE/
:
:If X=1
: Text(0,50,Str1
:End
:If X=2
: Text(0,50,Str2
:End
:./ZEIGE
:
:
:
:
:
:
:
:End
:
:
:
:
:.LEAVE/
:
:If X=1
: conj(60,Str1,90)
: conj("p1 has left TItalk",Str1,18)
: Send(Str1,5000
:End
:If X=2
: conj(Str60,Str2,90)
:  conj("p2 has left TItalk",Str2,18)
: Send(Str2,5000
:End
:
:./LEAVE

* CHAT0001.8xp (1.65 KB - downloaded 16 times.)
« Last Edit: 25 August, 2011, 15:36:21 by p2 » Logged


FREEDOM
OF THE INTERNET
Spoiler for spoilers:
Spoiler for PICTURE:
Spoiler for userbars:



Spoiler for me:
Spoiler for Pic of me:
Spoiler for what I like:
MUSIC:
Dragonforce - Fury of the storm
Dragonforce - Through fire and flames
Skillet - Awake and alive
Skillet - Monster
Nelly - Just a dream
Linkin Park - No more Sorrow
Silbermond - An alle Krieger des Lichts
Wise Guys - Das bedeutet Krieg!
Wise Guys - Das war's wert!

GAMES:
Fancy Pants adventures - World 1
                                 - World 2
                                 - Sneak Peak
                                 - World 3 demo
Droid Assault
Age of Empires
Empire Earth

VIDEOS/FILMS:
StarGate SG1
StarTrek
TheAnnoyingOrange
V for Vendetta
War Games (1 + 2)

BOOKS:
Anthony Horowitz - Alex Rider 1: Stormbreaker
                        - Alex Rider 2: Skelleton Key
                        - Alex Rider 3: Point Blanc
                        - Alex Rider 4: Eagle Strike
                        - Alex Rider 5: Ark Angle
                        - Alex Rider 6: Scorpia
                        - Alex Rider 7: Crocodile tears
                        - Alex Rider 8: Scorpia Rising
Chris Archer - Alpha Kids 1
                 - Alpha Kids 2
                 - Alpha Kids 3
                 - Alpha Kids 4
                 - Alpha Kids 5
                 - Alpha Kids 6
                 - Alpha Kids 7
                 - Still don't have #8 Sad
                 - Alpha Kids 9
                 - Alpha Kids 10
Andreas Schlüter - Level 10 (every book)
Spoiler for Holy Necropost Batman:
Heiligen post-mortem Post, Schlägermann!
This is an example of how wonderful Google Translator works!
Spoiler for wise thing I stole from calc85maniac's profile:
"Most people ask, 'What does a thing do?' Hackers ask, 'What can I make it do?'" - Pablos Holman
Pages: [1]   Go Up
  Print  
 
Jump to:  

Powered by EzPortal
Powered by MySQL Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Powered by PHP
Page created in 0.647 seconds with 30 queries.
Skin by DJ Omnimaga edited from SMF default theme with the help of tr1p1ea.
All programs, games and songs avaliable on this website are property of their respective owners.
Best viewed in Opera, Firefox, Chrome and Safari with a resolution of 1024x768 or above.