Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   Puzzling Echo Issue (https://forums.graalonline.com/forums/showthread.php?t=134269966)

Rob 05-13-2015 09:02 AM

Puzzling Echo Issue
 
EDIT: Sorta figured it out.

PHP Code:

//#CLIENTSIDE
function onCreated() {
 echo(
"TESTING");
 echo(
"______________________________");
 echo(
"_____________________________");
 echo(
"______________________________");
 echo(
"_____________________________");
 echo(
"______________________________");
 echo(
"_____________________________");
 echo(
"______________________________");
 echo(
"_____________________________");
 echo(
"______________________________");
 echo(
"_____________________________");
 echo(
"______________________________");
 echo(
"_____________________________");
 echo(
"______________________________");
 echo(
"_____________________________");
 echo(
"______________________________");
 echo(
"_____________________________");
 echo(
"______________________________");
 echo(
1);
 echo(
2);
 echo(
3);
 echo(
4);
 echo(
5);
 echo(
6);
 echo(
7);
 echo(
8);
 echo(
9);
 echo(
10);
 echo(
11);
 echo(
12);
 echo(
"hey guys" SPC player.ap);
 echo(
13);


Check F2.

The problem I was running into in my script was really bizarre. It seemed as though I couldn't echo just basic text information anymore after a certain amount of similar echoes (the number being 10).

Note in this script how the alternating __________'s are repeated 17 times, with the word TESTING in front.

What you get is the word "TESTING" followed by 9 ________'s, with the other 8 omitted.

If you delete TESTING you get 10 _________'s with only 7 omitted.

What I assumed to be the case was that you could only have up to 10 same-type echoes (10 strings, 10 ints, etc). But that doesn't seem to be the case (note how it echoes up to 10 no problem).

Additionally, echo seems to work as many times as you want when dealing with variables (which is what was so confusing in my script -- SOME echoes that were printing SOME variables were working, while other echoes which were printing OTHER variables or no variables weren't!)

If anyone cares to find the rhyme or reason to this (or already knows it) please let me know. I'd be very interested.

Crow 05-13-2015 09:24 AM

Try strings instead of just numbers. Just a guess, my GS2 knowledge is a bit rusty..

Rob 05-13-2015 01:34 PM

Quote:

Originally Posted by Crow (Post 1736224)
Try strings instead of just numbers. Just a guess, my GS2 knowledge is a bit rusty..

Those are strings.

Cubical 05-13-2015 02:00 PM

nah you need to throw quotes around the numbers

Crow 05-13-2015 05:29 PM

Quote:

Originally Posted by Rob (Post 1736228)
Those are strings.

Not a string:
PHP Code:



String:
PHP Code:

"9" 


Cubical 05-13-2015 06:10 PM

also o is not 0

Tim_Rocks 05-13-2015 08:50 PM

Rob, please stick to finger painting.

cbk1994 05-13-2015 11:45 PM

This has been happening for as long as I can remember (basically since v5 was released). I never figured out exactly what was causing it or how to avoid it. At least in my experience, it has nothing to do with strings/integers.


All times are GMT +2. The time now is 06:57 PM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.