Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting
FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 05-13-2015, 09:02 AM
Rob Rob is offline
Playerworld Administrator
Join Date: Apr 2015
Posts: 8
Rob is on a distinguished road
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.

Last edited by Rob; 05-13-2015 at 09:56 AM..
Reply With Quote
  #2  
Old 05-13-2015, 09:24 AM
Crow Crow is offline
ǝɔɐɹq ʎןɹnɔ
Crow's Avatar
Join Date: Dec 2006
Location: Germany
Posts: 5,153
Crow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond repute
Try strings instead of just numbers. Just a guess, my GS2 knowledge is a bit rusty..
__________________
Reply With Quote
  #3  
Old 05-13-2015, 01:34 PM
Rob Rob is offline
Playerworld Administrator
Join Date: Apr 2015
Posts: 8
Rob is on a distinguished road
Quote:
Originally Posted by Crow View Post
Try strings instead of just numbers. Just a guess, my GS2 knowledge is a bit rusty..
Those are strings.
Reply With Quote
  #4  
Old 05-13-2015, 02:00 PM
Cubical Cubical is offline
Banned
Join Date: Feb 2007
Posts: 1,348
Cubical has a brilliant futureCubical has a brilliant futureCubical has a brilliant futureCubical has a brilliant futureCubical has a brilliant futureCubical has a brilliant futureCubical has a brilliant future
nah you need to throw quotes around the numbers
Reply With Quote
  #5  
Old 05-13-2015, 05:29 PM
Crow Crow is offline
ǝɔɐɹq ʎןɹnɔ
Crow's Avatar
Join Date: Dec 2006
Location: Germany
Posts: 5,153
Crow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond repute
Quote:
Originally Posted by Rob View Post
Those are strings.
Not a string:
PHP Code:

String:
PHP Code:
"9" 
__________________
Reply With Quote
  #6  
Old 05-13-2015, 06:10 PM
Cubical Cubical is offline
Banned
Join Date: Feb 2007
Posts: 1,348
Cubical has a brilliant futureCubical has a brilliant futureCubical has a brilliant futureCubical has a brilliant futureCubical has a brilliant futureCubical has a brilliant futureCubical has a brilliant future
also o is not 0
Reply With Quote
  #7  
Old 05-13-2015, 08:50 PM
Tim_Rocks Tim_Rocks is offline
a true gentlemen
Tim_Rocks's Avatar
Join Date: Aug 2008
Location: USA
Posts: 1,863
Tim_Rocks is a splendid one to beholdTim_Rocks is a splendid one to beholdTim_Rocks is a splendid one to beholdTim_Rocks is a splendid one to behold
Rob, please stick to finger painting.
__________________
Reply With Quote
  #8  
Old 05-13-2015, 11:45 PM
cbk1994 cbk1994 is offline
the fake one
cbk1994's Avatar
Join Date: Mar 2003
Location: San Francisco
Posts: 10,718
cbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond repute
Send a message via AIM to cbk1994
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.
__________________
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 10:34 PM.


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